Android: Convert AbstractBooleanSetting to Kotlin

This commit is contained in:
Charles Lombardo 2023-03-15 03:23:01 -04:00
parent 21e0b5b9d9
commit 5bc2b46983
3 changed files with 10 additions and 13 deletions

View File

@ -43,7 +43,7 @@ abstract class SettingDisabledWarningFragment(
super.onResume()
val activity = requireActivity() as CheatsActivity
activity.loadGameSpecificSettings().use {
val cheatsEnabled = setting.getBoolean()
val cheatsEnabled = setting.boolean
requireView().visibility = if (cheatsEnabled) View.GONE else View.VISIBLE
}
}

View File

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.settings.model;
import androidx.annotation.NonNull;
public interface AbstractBooleanSetting extends AbstractSetting
{
boolean getBoolean();
void setBoolean(@NonNull Settings settings, boolean newValue);
}

View File

@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.settings.model
interface AbstractBooleanSetting : AbstractSetting {
val boolean: Boolean
fun setBoolean(settings: Settings, newValue: Boolean)
}