Merge pull request #2049 from Bnyro/master

hide the open with button by default
This commit is contained in:
Bnyro 2022-11-25 18:58:36 +01:00 committed by GitHub
commit 14817245b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 0 deletions

View File

@ -84,6 +84,7 @@ object PreferenceKeys {
const val USE_HLS_OVER_DASH = "use_hls"
const val QUEUE_AUTO_INSERT_RELATED = "queue_insert_related_videos"
const val PLAYER_SWIPE_CONTROLS = "player_swipe_controls"
const val SHOW_OPEN_WITH = "show_open_with"
/**
* Background mode

View File

@ -403,6 +403,11 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
LinearLayoutManager.HORIZONTAL,
false
)
if (!PreferenceHelper.getBoolean(PreferenceKeys.SHOW_OPEN_WITH, false)) {
binding.relPlayerOpen.visibility = View.GONE
binding.optionsLL.weightSum = 4f
}
}
private fun setFullscreen() {

View File

@ -140,6 +140,7 @@
app:cardCornerRadius="27dp">
<LinearLayout
android:id="@+id/optionsLL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"

View File

@ -395,6 +395,8 @@
<string name="swipe_controls">Swipe controls</string>
<string name="swipe_controls_summary">Use swipe gesture to adjust the brightness and volume.</string>
<string name="defaults">Defaults</string>
<string name="show_open_with">Open With</string>
<string name="show_open_with_summary">Show a button to open the video with a 3rd party app at the player.</string>
<!-- Notification channel strings -->
<string name="download_channel_name">Download Service</string>

View File

@ -134,6 +134,13 @@
app:key="pause_screen_off"
app:title="@string/pauseOnScreenOff" />
<SwitchPreferenceCompat
android:icon="@drawable/ic_open"
android:summary="@string/show_open_with_summary"
app:defaultValue="false"
app:key="show_open_with"
app:title="@string/show_open_with" />
</PreferenceCategory>
</PreferenceScreen>