Use Compose version of SyncFavoritesWarningDialog

This commit is contained in:
Jobobby04
2022-12-03 18:22:30 -05:00
parent 9a55b70d91
commit 8b57decea6
2 changed files with 9 additions and 26 deletions
@@ -1,21 +0,0 @@
package exh.favorites
import android.content.Context
import androidx.core.text.HtmlCompat
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import eu.kanade.domain.UnsortedPreferences
import eu.kanade.tachiyomi.R
import uy.kohesive.injekt.injectLazy
class FavoritesIntroDialog {
private val prefs: UnsortedPreferences by injectLazy()
fun show(context: Context) = MaterialAlertDialogBuilder(context)
.setTitle(R.string.favorites_sync_notes)
.setMessage(HtmlCompat.fromHtml(context.getString(R.string.favorites_sync_notes_message), HtmlCompat.FROM_HTML_MODE_LEGACY))
.setPositiveButton(android.R.string.ok) { _, _ ->
prefs.exhShowSyncIntro().set(false)
}
.setCancelable(false)
.show()
}