Save control on cloud
This commit is contained in:
parent
049d12304a
commit
9dcc8e35ad
1 changed files with 4 additions and 0 deletions
|
@ -9,14 +9,17 @@ import android.widget.BaseAdapter
|
|||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatDialogFragment
|
||||
import dev.lucasnlm.antimine.R
|
||||
import dev.lucasnlm.antimine.cloud.CloudSaveManager
|
||||
import dev.lucasnlm.antimine.control.view.ControlItemView
|
||||
import dev.lucasnlm.antimine.control.view.SimpleControlItemView
|
||||
import dev.lucasnlm.antimine.control.viewmodel.ControlEvent
|
||||
import dev.lucasnlm.antimine.control.viewmodel.ControlViewModel
|
||||
import dev.lucasnlm.antimine.core.control.ControlStyle
|
||||
import org.koin.android.ext.android.inject
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
|
||||
class ControlDialogFragment : AppCompatDialogFragment() {
|
||||
private val cloudSaveManager by inject<CloudSaveManager>()
|
||||
private val controlViewModel by viewModel<ControlViewModel>()
|
||||
private val adapter by lazy { ControlListAdapter(controlViewModel) }
|
||||
|
||||
|
@ -33,6 +36,7 @@ class ControlDialogFragment : AppCompatDialogFragment() {
|
|||
if (activity is DialogInterface.OnDismissListener) {
|
||||
(activity as DialogInterface.OnDismissListener).onDismiss(dialog)
|
||||
}
|
||||
cloudSaveManager.uploadSave()
|
||||
super.onDismiss(dialog)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue