Skip to content

Commit

Permalink
Merge branch 'conversation-activity' into release-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
moezbhatti committed Apr 27, 2016
2 parents 9044f22 + 303a292 commit 1106b1f
Show file tree
Hide file tree
Showing 33 changed files with 993 additions and 2,040 deletions.
19 changes: 17 additions & 2 deletions QKSMS/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@
android:name=".ui.MainActivity"
android:icon="@mipmap/ic_launcher_teal"
android:label="@string/app_name"
android:launchMode="singleTask"
android:logo="@color/transparent"
android:windowSoftInputMode="stateUnchanged|adjustResize">
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN" />
Expand All @@ -81,13 +80,29 @@
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

<category android:name="android.intent.category.DEFAULT" />

<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
<data android:scheme="sms_body" />
</intent-filter>
</activity>
<activity
android:name=".ui.messagelist.MessageListActivity"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize" />

<activity
android:name=".ui.settings.SettingsActivity"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".ui.search.SearchActivity"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".ui.compose.ComposeActivity"
android:windowSoftInputMode="adjustResize" />

<activity-alias
android:name=".ui.MainActivity-Teal"
Expand Down
7 changes: 5 additions & 2 deletions QKSMS/src/main/java/com/moez/QKSMS/common/DialogHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.moez.QKSMS.ui.base.QKActivity;
import com.moez.QKSMS.ui.dialog.DefaultSmsHelper;
import com.moez.QKSMS.ui.dialog.QKDialog;
import com.moez.QKSMS.ui.messagelist.MessageListActivity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
Expand All @@ -30,7 +31,7 @@ public static void showDeleteConversationDialog(MainActivity context, long threa
showDeleteConversationsDialog(context, threadIds);
}

public static void showDeleteConversationsDialog(final MainActivity context, final Set<Long> threadIds) {
public static void showDeleteConversationsDialog(final QKActivity context, final Set<Long> threadIds) {
new DefaultSmsHelper(context, R.string.not_default_delete).showIfNotDefault(null);

Set<Long> threads = new HashSet<>(threadIds); // Make a copy so the list isn't reset when multi-select is disabled
Expand All @@ -43,7 +44,9 @@ public static void showDeleteConversationsDialog(final MainActivity context, fin
Conversation.ConversationQueryHandler handler = new Conversation.ConversationQueryHandler(context.getContentResolver());
Conversation.startDelete(handler, 0, false, threads);
Conversation.asyncDeleteObsoleteThreads(handler, 0);
context.showMenu();
if (context instanceof MessageListActivity) {
context.onBackPressed();
}
})
.setNegativeButton(R.string.cancel, null)
.show();
Expand Down
1 change: 0 additions & 1 deletion QKSMS/src/main/java/com/moez/QKSMS/enums/QKPreference.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public enum QKPreference {
AVATAR_RECEIVED("pref_key_avatar_received", true),

MESSAGE_COUNT("pref_key_message_count", false),
SLIDING_TAB("pref_key_sliding_tab", false),
TIMESTAMPS_24H("pref_key_24h", false),

// General
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.ThemeManager;
import com.moez.QKSMS.ui.messagelist.MessageItem;
import com.moez.QKSMS.ui.messagelist.MessageListActivity;
import com.moez.QKSMS.ui.popup.QKComposeActivity;
import com.moez.QKSMS.ui.popup.QKReplyActivity;
import com.moez.QKSMS.ui.settings.SettingsFragment;
Expand Down Expand Up @@ -316,7 +317,7 @@ public void run() {
if (failedCursor.getCount() == 1) {
title = sRes.getString(R.string.failed_message);
Intent intent = new Intent(context, MainActivity.class);
intent.putExtra(MainActivity.EXTRA_THREAD_ID, failedCursor.getLong(0));
intent.putExtra(MessageListActivity.ARG_THREAD_ID, failedCursor.getLong(0));
PI = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
} else {
title = failedCursor.getCount() + " " + sRes.getString(R.string.failed_messages);
Expand Down Expand Up @@ -475,7 +476,7 @@ private static void buildSingleMessageNotification(final Context context, ArrayL
final PendingIntent replyPI = PendingIntent.getActivity(context, buildRequestCode(threadId, 0), replyIntent, PendingIntent.FLAG_UPDATE_CURRENT);

Intent threadIntent = new Intent(context, MainActivity.class);
threadIntent.putExtra(MainActivity.EXTRA_THREAD_ID, threadId);
threadIntent.putExtra(MessageListActivity.ARG_THREAD_ID, threadId);
final PendingIntent threadPI = PendingIntent.getActivity(context, buildRequestCode(threadId, 1), threadIntent, PendingIntent.FLAG_UPDATE_CURRENT);

Intent readIntent = new Intent(ACTION_MARK_READ);
Expand Down Expand Up @@ -575,7 +576,7 @@ private static void singleSender(final Context context, ArrayList<MessageItem> m
PendingIntent replyPI = PendingIntent.getActivity(context, buildRequestCode(threadId, 0), replyIntent, PendingIntent.FLAG_UPDATE_CURRENT);

Intent threadIntent = new Intent(context, MainActivity.class);
threadIntent.putExtra(MainActivity.EXTRA_THREAD_ID, threadId);
threadIntent.putExtra(MessageListActivity.ARG_THREAD_ID, threadId);
PendingIntent threadPI = PendingIntent.getActivity(context, buildRequestCode(threadId, 1), threadIntent, PendingIntent.FLAG_UPDATE_CURRENT);

Intent readIntent = new Intent(ACTION_MARK_READ);
Expand Down
Loading

0 comments on commit 1106b1f

Please sign in to comment.