mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-01 22:58:57 +01:00
Remove unneeded annotations and some cleanup
This commit is contained in:
@@ -8,8 +8,10 @@ import android.support.v4.content.ContextCompat
|
||||
import android.support.v7.app.ActionBar
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
import eu.kanade.tachiyomi.App
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
interface ActivityMixin {
|
||||
|
||||
@@ -22,7 +24,7 @@ interface ActivityMixin {
|
||||
}
|
||||
|
||||
fun setAppTheme() {
|
||||
setTheme(when (App.get(getActivity()).appTheme) {
|
||||
setTheme(when (Injekt.get<PreferencesHelper>().theme()) {
|
||||
2 -> R.style.Theme_Tachiyomi_Dark
|
||||
else -> R.style.Theme_Tachiyomi
|
||||
})
|
||||
|
||||
@@ -50,7 +50,6 @@ class CategoryActivity : BaseRxActivity<CategoryPresenter>(), ActionMode.Callbac
|
||||
*
|
||||
* @param context context information.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newIntent(context: Context): Intent {
|
||||
return Intent(context, CategoryActivity::class.java)
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ class DownloadFragment : BaseRxFragment<DownloadPresenter>() {
|
||||
*
|
||||
* @return a new instance of [DownloadFragment].
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newInstance(): DownloadFragment {
|
||||
return DownloadFragment()
|
||||
}
|
||||
|
||||
@@ -95,7 +95,6 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
|
||||
*
|
||||
* @return a new instance of [LibraryFragment].
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newInstance(): LibraryFragment {
|
||||
return LibraryFragment()
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ class RecentChaptersFragment
|
||||
* Create new RecentChaptersFragment.
|
||||
* @return a new instance of [RecentChaptersFragment].
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newInstance(): RecentChaptersFragment {
|
||||
return RecentChaptersFragment()
|
||||
}
|
||||
|
||||
@@ -27,9 +27,7 @@ class RecentlyReadFragment : BaseRxFragment<RecentlyReadPresenter>() {
|
||||
companion object {
|
||||
/**
|
||||
* Create new RecentChaptersFragment.
|
||||
*
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newInstance(): RecentlyReadFragment {
|
||||
return RecentlyReadFragment()
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.support.v14.preference.MultiSelectListPreference
|
||||
import android.support.v4.app.TaskStackBuilder
|
||||
import android.support.v7.preference.Preference
|
||||
import android.view.View
|
||||
import eu.kanade.tachiyomi.App
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.library.LibraryUpdateAlarm
|
||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||
@@ -62,8 +61,6 @@ class SettingsGeneralFragment : SettingsNestedFragment() {
|
||||
}
|
||||
|
||||
themePreference.setOnPreferenceChangeListener { preference, newValue ->
|
||||
App.get(activity).appTheme = (newValue as String).toInt()
|
||||
|
||||
// Rebuild activity's to apply themes.
|
||||
TaskStackBuilder.create(activity)
|
||||
.addNextIntent(Intent(activity, MainActivity::class.java))
|
||||
|
||||
Reference in New Issue
Block a user