Refine code style

This commit is contained in:
Mygod
2019-01-01 14:32:00 +08:00
parent 7be7af36c9
commit 2c28e1afec
2 changed files with 5 additions and 3 deletions

View File

@@ -27,6 +27,10 @@ class EBegFragment : DialogFragment(), PurchasesUpdatedListener, BillingClientSt
private const val KEY_MESSAGE = "message"
}
init {
setStyle(DialogFragment.STYLE_NO_TITLE, 0)
}
class MessageDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?) = AlertDialog.Builder(requireContext()).apply {
val arguments = arguments!!

View File

@@ -7,7 +7,6 @@ import android.os.Bundle
import androidx.core.content.FileProvider
import androidx.core.net.toUri
import androidx.core.os.bundleOf
import androidx.fragment.app.DialogFragment
import androidx.preference.Preference
import androidx.preference.SwitchPreference
import be.mygod.vpnhotspot.App.Companion.app
@@ -124,8 +123,7 @@ class SettingsPreferenceFragment : PreferenceFragmentCompat() {
true
}
findPreference("misc.donate").setOnPreferenceClickListener {
EBegFragment().apply { setStyle(DialogFragment.STYLE_NO_TITLE, 0) }
.show(fragmentManager ?: return@setOnPreferenceClickListener false, "EBegFragment")
EBegFragment().show(fragmentManager ?: return@setOnPreferenceClickListener false, "EBegFragment")
true
}
}