mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
commit
c796025d7d
@ -36,7 +36,6 @@ import com.github.libretube.models.SearchViewModel
|
||||
import com.github.libretube.preferences.PreferenceHelper
|
||||
import com.github.libretube.preferences.PreferenceKeys
|
||||
import com.github.libretube.services.ClosingService
|
||||
import com.github.libretube.util.LocaleHelper
|
||||
import com.github.libretube.util.NetworkHelper
|
||||
import com.github.libretube.util.ThemeHelper
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
@ -54,9 +53,6 @@ class MainActivity : BaseActivity() {
|
||||
lateinit var searchView: SearchView
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// set the language
|
||||
LocaleHelper.updateLanguage(this)
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
autoRotationEnabled = PreferenceHelper.getBoolean(PreferenceKeys.AUTO_ROTATION, false)
|
||||
|
@ -2,13 +2,20 @@ package com.github.libretube.extensions
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.libretube.util.LocaleHelper
|
||||
import com.github.libretube.util.ThemeHelper
|
||||
|
||||
/**
|
||||
* Activity that applies the LibreTube theme and the in-app language
|
||||
*/
|
||||
open class BaseActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// set the app theme (e.g. Material You)
|
||||
ThemeHelper.updateTheme(this)
|
||||
|
||||
// set the apps language
|
||||
LocaleHelper.updateLanguage(this)
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user