~singpolyma/cheogram-android

ee5b337df44d3e8a5bb260ff2c9de279c48e1dbb — Stephen Paul Weber 5 months ago ea7a35d
Don't archive conversations while onboarding

Anything you have open is essential to the process.
M src/main/java/eu/siacs/conversations/services/XmppConnectionService.java => src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +2 -0
@@ 2431,6 2431,8 @@ public class XmppConnectionService extends Service {
    }

    private void archiveConversation(Conversation conversation, final boolean maySynchronizeWithBookmarks) {
        if (isOnboarding()) return;

        getNotificationService().clear(conversation);
        conversation.setStatus(Conversation.STATUS_ARCHIVED);
        conversation.setNextMessage(null);

M src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java +5 -3
@@ 205,7 205,7 @@ public class ConversationsOverviewFragment extends XmppFragment {
		}
	};

	private ItemTouchHelper touchHelper;
	private ItemTouchHelper touchHelper = null;

	public static Conversation getSuggestion(Activity activity) {
		final Conversation exception;


@@ 305,8 305,6 @@ public class ConversationsOverviewFragment extends XmppFragment {
		this.binding.list.setAdapter(this.conversationsAdapter);
		this.binding.list.setLayoutManager(new LinearLayoutManager(getActivity(),LinearLayoutManager.VERTICAL,false));
		registerForContextMenu(this.binding.list);
		this.touchHelper = new ItemTouchHelper(this.callback);
		this.touchHelper.attachToRecyclerView(this.binding.list);
		return binding.getRoot();
	}



@@ 387,6 385,10 @@ public class ConversationsOverviewFragment extends XmppFragment {

	@Override
	public void onBackendConnected() {
		if (this.touchHelper == null && (activity.xmppConnectionService == null || !activity.xmppConnectionService.isOnboarding())) {
			this.touchHelper = new ItemTouchHelper(this.callback);
			this.touchHelper.attachToRecyclerView(this.binding.list);
		}
		refresh();
	}