From 0759468fa78338b466d3102146a43e6014065b48 Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Sun, 24 Nov 2019 16:47:10 +0100 Subject: [PATCH] [Sync] Add syncing all to manual sync dialog. --- .../edziennik/ui/dialogs/sync/SyncViewListDialog.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/sync/SyncViewListDialog.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/sync/SyncViewListDialog.kt index d46aec44..a857a538 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/sync/SyncViewListDialog.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/sync/SyncViewListDialog.kt @@ -102,6 +102,12 @@ class SyncViewListDialog( ).enqueue(activity) } } + .setNeutralButton(R.string.sync_feature_all) { _, _ -> + dialog.dismiss() + + activity.swipeRefreshLayout.isRefreshing = true + EdziennikTask.syncProfile(App.profileId).enqueue(activity) + } .setNegativeButton(R.string.cancel) { _, _ -> dialog.dismiss() }