~singpolyma/cheogram-android

3be806103f599c0bb43d79110e66c15c3e68b135 — Stephen Paul Weber 1 year, 4 months ago b1a13a6
Remove cleanup conversations
M src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java => src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +0 -12
@@ 628,18 628,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
            case R.id.action_scan_qr_code:
                UriHandlerActivity.scan(this);
                return true;
            case R.id.action_cleanup:
                for (Conversation c : ImmutableList.copyOf(xmppConnectionService.getConversations())) {
                    c.trim();
                    if (c.getDraftMessage() != null) continue;
                    if (c.getReplyTo() != null) continue;
                    if (c.getMode() == Conversation.MODE_MULTI) continue;
                    if (c.getBooleanAttribute(Conversation.ATTRIBUTE_PINNED_ON_TOP, false)) continue;
                    if (c.unreadCount() > 0) continue;
                    if (c.getSortableTime() > System.currentTimeMillis() - 600000) continue;
                    xmppConnectionService.archiveConversation(c);
                }
                break;
            case R.id.action_search_all_conversations:
                startActivity(new Intent(this, SearchActivity.class));
                return true;

M src/main/res/menu/fragment_conversations_overview.xml => src/main/res/menu/fragment_conversations_overview.xml +0 -5
@@ 52,11 52,6 @@
        android:title="@string/action_account"
        app:showAsAction="never" />
    <item
        android:id="@+id/action_cleanup"
        android:orderInCategory="95"
        android:title="Cleanup Conversations"
        app:showAsAction="never" />
    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"