From 73383aa2c2035ba8c5b4e75cbda58f25352a8101 Mon Sep 17 00:00:00 2001
From: Christian Basler
Date: Sun, 22 Nov 2015 12:28:31 +0100
Subject: [PATCH] Renamed MessageListActivity to MainActivity (it is the main
activity, after all)
---
app/src/main/AndroidManifest.xml | 16 ++++++-------
...ageListActivity.java => MainActivity.java} | 24 +++++++++++--------
.../apps/abit/MessageDetailActivity.java | 5 ++--
.../apps/abit/MessageDetailFragment.java | 6 +----
.../dissem/apps/abit/MessageListFragment.java | 10 ++++----
.../apps/abit/SubscriptionDetailActivity.java | 4 ++--
.../apps/abit/SubscriptionDetailFragment.java | 2 +-
.../apps/abit/listener/MessageListener.java | 12 ----------
.../notification/NetworkNotification.java | 4 ++--
.../notification/NewMessageNotification.java | 10 ++++----
.../notification/ProofOfWorkNotification.java | 4 ++--
.../layout/activity_open_bitmessage_link.xml | 16 +++++++++----
12 files changed, 55 insertions(+), 58 deletions(-)
rename app/src/main/java/ch/dissem/apps/abit/{MessageListActivity.java => MainActivity.java} (96%)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f0fbceb..979915d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme">
@@ -29,28 +29,28 @@
+ android:value=".MainActivity" />
+ android:value=".MainActivity" />
+ android:parentActivityName=".MainActivity">
+ android:value=".MainActivity" />
@@ -79,7 +79,7 @@
+ android:parentActivityName=".MainActivity">
diff --git a/app/src/main/java/ch/dissem/apps/abit/MessageListActivity.java b/app/src/main/java/ch/dissem/apps/abit/MainActivity.java
similarity index 96%
rename from app/src/main/java/ch/dissem/apps/abit/MessageListActivity.java
rename to app/src/main/java/ch/dissem/apps/abit/MainActivity.java
index b21acb1..6f444ad 100644
--- a/app/src/main/java/ch/dissem/apps/abit/MessageListActivity.java
+++ b/app/src/main/java/ch/dissem/apps/abit/MainActivity.java
@@ -42,6 +42,8 @@ import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
import ch.dissem.apps.abit.listener.ActionBarListener;
import ch.dissem.apps.abit.listener.ListSelectionListener;
@@ -77,12 +79,12 @@ import static ch.dissem.apps.abit.synchronization.StubProvider.AUTHORITY;
* to listen for item selections.
*
*/
-public class MessageListActivity extends AppCompatActivity
+public class MainActivity extends AppCompatActivity
implements ListSelectionListener, ActionBarListener {
public static final String EXTRA_SHOW_MESSAGE = "ch.dissem.abit.ShowMessage";
public static final String ACTION_SHOW_INBOX = "ch.dissem.abit.ShowInbox";
- private static final Logger LOG = LoggerFactory.getLogger(MessageListActivity.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MainActivity.class);
private static final long SYNC_FREQUENCY = 15 * 60; // seconds
private static final int ADD_IDENTITY = 1;
@@ -99,8 +101,8 @@ public class MessageListActivity extends AppCompatActivity
private static ServiceConnection connection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
- MessageListActivity.service = new Messenger(service);
- MessageListActivity.bound = true;
+ MainActivity.service = new Messenger(service);
+ MainActivity.bound = true;
}
@Override
@@ -121,8 +123,10 @@ public class MessageListActivity extends AppCompatActivity
super.onCreate(savedInstanceState);
messageRepo = Singleton.getMessageRepository(this);
addressRepo = Singleton.getAddressRepository(this);
-
- selectedLabel = messageRepo.getLabels().get(0);
+ List