forked from upstream-mirrors/quik
Minor cleanup
This commit is contained in:
@@ -757,12 +757,10 @@ public class Conversation {
|
||||
* @param deleteAll Delete the whole thread including locked messages
|
||||
* @param threadIds Collection of thread IDs of the conversations to be deleted
|
||||
*/
|
||||
public static void startDelete(ConversationQueryHandler handler, int token, boolean deleteAll,
|
||||
Collection<Long> threadIds) {
|
||||
public static void startDelete(ConversationQueryHandler handler, int token, boolean deleteAll, Collection<Long> threadIds) {
|
||||
synchronized (sDeletingThreadsLock) {
|
||||
if (DELETEDEBUG) {
|
||||
Log.v(TAG, "Conversation startDelete sDeletingThreads: " +
|
||||
sDeletingThreads);
|
||||
Log.v(TAG, "Conversation startDelete sDeletingThreads: " + sDeletingThreads);
|
||||
}
|
||||
if (sDeletingThreads) {
|
||||
Log.e(TAG, "startDeleteAll already in the middle of a delete", new Exception());
|
||||
@@ -829,18 +827,11 @@ public class Conversation {
|
||||
@Override
|
||||
protected void onDeleteComplete(int token, Object cookie, int result) {
|
||||
if (token == mDeleteToken) {
|
||||
// Test code
|
||||
// try {
|
||||
// Thread.sleep(10000);
|
||||
// } catch (InterruptedException e) {
|
||||
// }
|
||||
|
||||
// release lock
|
||||
synchronized (sDeletingThreadsLock) {
|
||||
sDeletingThreads = false;
|
||||
if (DELETEDEBUG) {
|
||||
Log.v(TAG, "Conversation onDeleteComplete sDeletingThreads: " +
|
||||
sDeletingThreads);
|
||||
Log.v(TAG, "Conversation onDeleteComplete sDeletingThreads: " + sDeletingThreads);
|
||||
}
|
||||
sDeletingThreadsLock.notifyAll();
|
||||
}
|
||||
|
||||
@@ -697,16 +697,13 @@ public class MainActivity extends QKActivity implements SlidingMenu.OnOpenListen
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, final int whichButton) {
|
||||
MessageUtils.handleReadReport(mContext, mThreadIds,
|
||||
PduHeaders.READ_STATUS__DELETED_WITHOUT_BEING_READ, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int token = DELETE_CONVERSATION_TOKEN;
|
||||
if (mThreadIds == null) {
|
||||
Conversation.startDeleteAll(mHandler, token, mDeleteLockedMessages);
|
||||
DraftCache.getInstance().refresh();
|
||||
} else {
|
||||
Conversation.startDelete(mHandler, token, mDeleteLockedMessages, mThreadIds);
|
||||
}
|
||||
PduHeaders.READ_STATUS__DELETED_WITHOUT_BEING_READ, () -> {
|
||||
int token = DELETE_CONVERSATION_TOKEN;
|
||||
if (mThreadIds == null) {
|
||||
Conversation.startDeleteAll(mHandler, token, mDeleteLockedMessages);
|
||||
DraftCache.getInstance().refresh();
|
||||
} else {
|
||||
Conversation.startDelete(mHandler, token, mDeleteLockedMessages, mThreadIds);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
+2
-1
@@ -120,7 +120,8 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the weighting for unread vs. read conversations that are selected
|
||||
* Returns the weighting for unread vs. read conversations that are selected, to decide
|
||||
* which options we should show in the multi selction toolbar
|
||||
*/
|
||||
private int getUnreadWeight() {
|
||||
int unreadWeight = 0;
|
||||
|
||||
Reference in New Issue
Block a user