forked from github/wulkanowy-mirror
Remove force sync dialog (#938)
This commit is contained in:
parent
90be9d1add
commit
f8b7baef24
@ -120,15 +120,6 @@ class SettingsFragment : PreferenceFragmentCompat(),
|
|||||||
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showForceSyncDialog() {
|
|
||||||
AlertDialog.Builder(requireContext())
|
|
||||||
.setTitle(R.string.pref_services_dialog_force_sync_title)
|
|
||||||
.setMessage(R.string.pref_services_dialog_force_sync_summary)
|
|
||||||
.setPositiveButton(android.R.string.ok) { _, _ -> presenter.onForceSyncDialogSubmit() }
|
|
||||||
.setNegativeButton(android.R.string.cancel) { _, _ -> }
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun showFixSyncDialog() {
|
override fun showFixSyncDialog() {
|
||||||
AlertDialog.Builder(requireContext())
|
AlertDialog.Builder(requireContext())
|
||||||
.setTitle(R.string.pref_notify_fix_sync_issues)
|
.setTitle(R.string.pref_notify_fix_sync_issues)
|
||||||
|
@ -55,14 +55,6 @@ class SettingsPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun onSyncNowClicked() {
|
fun onSyncNowClicked() {
|
||||||
view?.showForceSyncDialog()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun onFixSyncIssuesClicked() {
|
|
||||||
view?.showFixSyncDialog()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun onForceSyncDialogSubmit() {
|
|
||||||
view?.run {
|
view?.run {
|
||||||
syncManager.startOneTimeSyncWorker().onEach { workInfo ->
|
syncManager.startOneTimeSyncWorker().onEach { workInfo ->
|
||||||
when (workInfo.state) {
|
when (workInfo.state) {
|
||||||
@ -87,4 +79,8 @@ class SettingsPresenter @Inject constructor(
|
|||||||
}.launch("sync")
|
}.launch("sync")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onFixSyncIssuesClicked() {
|
||||||
|
view?.showFixSyncDialog()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,5 @@ interface SettingsView : BaseView {
|
|||||||
|
|
||||||
fun setSyncInProgress(inProgress: Boolean)
|
fun setSyncInProgress(inProgress: Boolean)
|
||||||
|
|
||||||
fun showForceSyncDialog()
|
|
||||||
fun showFixSyncDialog()
|
fun showFixSyncDialog()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user