mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
commit
5e8ba03400
@ -99,12 +99,14 @@ class MainActivity : AppCompatActivity() {
|
||||
window.navigationBarColor = color
|
||||
|
||||
// hide the trending page if enabled
|
||||
val hideTrendingPage = PreferenceHelper.getBoolean(PreferenceKeys.HIDE_TRENDING_PAGE, false)
|
||||
val hideTrendingPage =
|
||||
PreferenceHelper.getBoolean(PreferenceKeys.HIDE_TRENDING_PAGE, false)
|
||||
if (hideTrendingPage) binding.bottomNav.menu.findItem(R.id.homeFragment).isVisible =
|
||||
false
|
||||
|
||||
// save start tab fragment id
|
||||
startFragmentId = when (PreferenceHelper.getString(PreferenceKeys.DEFAULT_TAB, "home")) {
|
||||
startFragmentId =
|
||||
when (PreferenceHelper.getString(PreferenceKeys.DEFAULT_TAB, "home")) {
|
||||
"home" -> R.id.homeFragment
|
||||
"subscriptions" -> R.id.subscriptionsFragment
|
||||
"library" -> R.id.libraryFragment
|
||||
|
@ -58,7 +58,6 @@ import com.github.libretube.obj.Streams
|
||||
import com.github.libretube.obj.Subscribe
|
||||
import com.github.libretube.preferences.PreferenceHelper
|
||||
import com.github.libretube.preferences.PreferenceKeys
|
||||
import com.github.libretube.services.IS_DOWNLOAD_RUNNING
|
||||
import com.github.libretube.util.BackgroundMode
|
||||
import com.github.libretube.util.ConnectionHelper
|
||||
import com.github.libretube.util.CronetHelper
|
||||
|
@ -143,7 +143,8 @@ class InstanceSettings : PreferenceFragmentCompat() {
|
||||
true
|
||||
}
|
||||
|
||||
val authInstanceToggle = findPreference<SwitchPreferenceCompat>(PreferenceKeys.AUTH_INSTANCE_TOGGLE)
|
||||
val authInstanceToggle =
|
||||
findPreference<SwitchPreferenceCompat>(PreferenceKeys.AUTH_INSTANCE_TOGGLE)
|
||||
authInstanceToggle?.setOnPreferenceChangeListener { _, newValue ->
|
||||
authInstance.isVisible = newValue == true
|
||||
logout()
|
||||
|
@ -16,8 +16,10 @@ class PlayerSettings : PreferenceFragmentCompat() {
|
||||
val settingsActivity = activity as SettingsActivity
|
||||
settingsActivity.changeTopBarText(getString(R.string.audio_video))
|
||||
|
||||
val playerOrientation = findPreference<ListPreference>(PreferenceKeys.FULLSCREEN_ORIENTATION)
|
||||
val autoRotateToFullscreen = findPreference<SwitchPreferenceCompat>(PreferenceKeys.AUTO_FULLSCREEN)
|
||||
val playerOrientation =
|
||||
findPreference<ListPreference>(PreferenceKeys.FULLSCREEN_ORIENTATION)
|
||||
val autoRotateToFullscreen =
|
||||
findPreference<SwitchPreferenceCompat>(PreferenceKeys.AUTO_FULLSCREEN)
|
||||
|
||||
// only show the player orientation option if auto fullscreen is disabled
|
||||
playerOrientation?.isEnabled != PreferenceHelper.getBoolean(
|
||||
|
@ -24,7 +24,8 @@ object PlayerHelper {
|
||||
|
||||
// get the system default caption style
|
||||
fun getCaptionStyle(context: Context): CaptionStyleCompat {
|
||||
val captioningManager = context.getSystemService(Context.CAPTIONING_SERVICE) as CaptioningManager
|
||||
val captioningManager =
|
||||
context.getSystemService(Context.CAPTIONING_SERVICE) as CaptioningManager
|
||||
return if (!captioningManager.isEnabled) {
|
||||
// system captions are disabled, using android default captions style
|
||||
CaptionStyleCompat.DEFAULT
|
||||
|
@ -5,6 +5,6 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,4.81L12,19c-3.31,0 -6,-2.63 -6,-5.87c0,-1.56 0.62,-3.03 1.75,-4.14L12,4.81M6.35,7.56L6.35,7.56C4.9,8.99 4,10.96 4,13.13C4,17.48 7.58,21 12,21c4.42,0 8,-3.52 8,-7.87c0,-2.17 -0.9,-4.14 -2.35,-5.57l0,0L12,2L6.35,7.56z"
|
||||
android:fillColor="#000000"/>
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M12,4.81L12,19c-3.31,0 -6,-2.63 -6,-5.87c0,-1.56 0.62,-3.03 1.75,-4.14L12,4.81M6.35,7.56L6.35,7.56C4.9,8.99 4,10.96 4,13.13C4,17.48 7.58,21 12,21c4.42,0 8,-3.52 8,-7.87c0,-2.17 -0.9,-4.14 -2.35,-5.57l0,0L12,2L6.35,7.56z" />
|
||||
</vector>
|
||||
|
@ -5,6 +5,6 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="m6,13c0,3.31 2.69,6 6,6 3.31,0 6,-2.69 6,-6 0,-3.31 -2.69,-6 -6,-6v4L7,6 12,1v4c4.42,0 8,3.58 8,8 0,4.42 -3.58,8 -8,8 -4.42,0 -8,-3.58 -8,-8z"
|
||||
android:fillColor="@android:color/white"/>
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="m6,13c0,3.31 2.69,6 6,6 3.31,0 6,-2.69 6,-6 0,-3.31 -2.69,-6 -6,-6v4L7,6 12,1v4c4.42,0 8,3.58 8,8 0,4.42 -3.58,8 -8,8 -4.42,0 -8,-3.58 -8,-8z" />
|
||||
</vector>
|
||||
|
@ -15,8 +15,8 @@
|
||||
android:layout_gravity="top"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<LinearLayout
|
||||
@ -92,8 +92,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
|
@ -80,12 +80,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_bell_small"
|
||||
android:drawableTint="?android:attr/textColorPrimary"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="@string/subscribe"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="12sp"
|
||||
android:stateListAnimator="@null"
|
||||
app:elevation="20dp"
|
||||
app:cornerRadius="20dp" />
|
||||
app:cornerRadius="20dp"
|
||||
app:elevation="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -67,8 +67,8 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:visibility="gone"
|
||||
app:cardElevation="20dp"
|
||||
app:cardCornerRadius="18dp">
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -82,9 +82,9 @@
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:icon="@drawable/ic_caption"
|
||||
app:defaultValue="true"
|
||||
app:key="system_caption_style"
|
||||
app:title="@string/system_caption_style"
|
||||
app:defaultValue="true" />
|
||||
app:title="@string/system_caption_style" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
@ -44,9 +44,9 @@
|
||||
app:title="@string/watch_positions" />
|
||||
|
||||
<Preference
|
||||
app:title="@string/reset_watch_positions"
|
||||
android:icon="@drawable/ic_reset"
|
||||
app:key="reset_watch_positions" />
|
||||
app:key="reset_watch_positions"
|
||||
app:title="@string/reset_watch_positions" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
@ -8,7 +8,8 @@
|
||||
<!-- Trust preinstalled CAs -->
|
||||
<certificates src="system" />
|
||||
<!-- Additionally trust user added CAs -->
|
||||
<certificates src="user"
|
||||
<certificates
|
||||
src="user"
|
||||
tools:ignore="AcceptsUserCertificates" />
|
||||
</trust-anchors>
|
||||
</base-config>
|
||||
|
Loading…
Reference in New Issue
Block a user