use property access syntax, join declaration and assignment in DoNotShowAgainDialogFragment, and other small misc changes
Signed-off-by: Taco <SkytkRSfan3895@gmail.com>
This commit is contained in:
parent
b457ed7571
commit
2074390179
4 changed files with 5 additions and 6 deletions
|
@ -95,7 +95,7 @@ class ConfirmationActivity : ActivityBase() {
|
|||
for (trial in 0..1) {
|
||||
try {
|
||||
StateKeeper.usbMassStorageDevice!!.init()
|
||||
val blockDev = StateKeeper.usbMassStorageDevice?.blockDevice
|
||||
val blockDev = StateKeeper.usbMassStorageDevice!!.blockDevice
|
||||
|
||||
if (blockDev != null) {
|
||||
val devSize = (blockDev.size.toLong() * blockDev.blockSize.toLong())
|
||||
|
@ -178,7 +178,7 @@ class ConfirmationActivity : ActivityBase() {
|
|||
else
|
||||
startService(intent)
|
||||
|
||||
moveTaskToBack(true);
|
||||
moveTaskToBack(true)
|
||||
finish()
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class StartActivity : ActivityBase() {
|
|||
FlashMethod.FLASH_API -> {
|
||||
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT)
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
intent.setType("*/*");
|
||||
intent.type = "*/*"
|
||||
startActivityForResult(intent, READ_REQUEST_CODE)
|
||||
}
|
||||
FlashMethod.FLASH_DMG_API -> {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package eu.depau.etchdroid.enums
|
||||
|
||||
enum class PartitionType {}
|
||||
enum class PartitionType
|
|
@ -16,12 +16,11 @@ class DoNotShowAgainDialogFragment(nightMode: Boolean) : DialogFragment() {
|
|||
var negativeButton: String? = null
|
||||
var message: String? = null
|
||||
var listener: DialogListener? = null
|
||||
val dialogTheme: Int
|
||||
val dialogTheme: Int = if (nightMode) R.style.DialogThemeDark else R.style.DialogThemeLight
|
||||
|
||||
constructor() : this(false)
|
||||
|
||||
init {
|
||||
dialogTheme = if (nightMode) R.style.DialogThemeDark else R.style.DialogThemeLight
|
||||
setStyle(DialogFragment.STYLE_NORMAL, dialogTheme)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue