Skip to content

Commit

Permalink
Fix check up confirm dialog crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
imknown committed Nov 29, 2019
1 parent c68561f commit 82b679f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import android.os.Build
import android.os.Bundle
import android.os.Looper
import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import androidx.core.content.FileProvider
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Observer
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.*
import net.imknown.android.forefrontinfo.*
import net.imknown.android.forefrontinfo.base.IFragmentView
Expand Down Expand Up @@ -243,7 +243,7 @@ class SettingsFragment : PreferenceFragmentCompat(), IFragmentView, CoroutineSco
)
val message = "$date\n$desc\n$log"

val builder = AlertDialog.Builder(MyApplication.instance)
val builder = MaterialAlertDialogBuilder(context)
builder.setTitle(title)
builder.setMessage(message)
builder.setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _: Int ->
Expand Down

0 comments on commit 82b679f

Please sign in to comment.