Base classes

This commit is contained in:
Adolfo Santiago 2021-11-17 19:49:30 +01:00
parent 60e40fe657
commit 8ef44dce27
No known key found for this signature in database
GPG key ID: 244D6F9A317B4A65
6 changed files with 11 additions and 9 deletions

View file

@ -0,0 +1,6 @@
package com.keylesspalace.tusky.core.ui.fragment
abstract class BaseBackFragment(layoutRes: Int) : BaseFragment(layoutRes) {
abstract fun onHandleBack(): Boolean
}

View file

@ -19,5 +19,7 @@
package com.keylesspalace.tusky.core.ui.fragment
class BaseFragment {
import com.zhuinden.simplestackextensions.fragments.KeyedFragment
open class BaseFragment(layoutRes: Int) : KeyedFragment(layoutRes) {
}

View file

@ -23,7 +23,5 @@ import com.zhuinden.simplestackextensions.fragments.DefaultFragmentKey
abstract class BaseKey : DefaultFragmentKey() {
override fun getFragmentTag(): String {
return this.javaClass.simpleName
}
override fun getFragmentTag(): String = this.javaClass.simpleName
}

View file

@ -23,7 +23,5 @@ import com.zhuinden.simplestackextensions.services.DefaultServiceProvider
abstract class BaseServiceKey : BaseKey(), DefaultServiceProvider.HasServices {
override fun getScopeTag(): String {
return this.javaClass.simpleName
}
override fun getScopeTag(): String = this.javaClass.simpleName
}

View file

@ -20,7 +20,6 @@
package com.keylesspalace.tusky.core.utils
import com.keylesspalace.tusky.BuildConfig
import com.keylesspalace.tusky.core.utils.Flavor.DEV
/**
* Utils for getting application details.

View file

@ -22,7 +22,6 @@ package com.keylesspalace.tusky.core.utils
import android.os.Build.VERSION
import android.os.Build.VERSION_CODES
import android.os.StrictMode
import com.keylesspalace.tusky.BuildConfig
import timber.log.Timber
object DevUtils {