kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Show correct tooltips for actions in feed
rodzic
e6391a860a
commit
051c572e7f
|
@ -41,6 +41,7 @@ import androidx.appcompat.app.AlertDialog
|
|||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.core.content.edit
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.MenuItemCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.preference.PreferenceManager
|
||||
|
@ -286,6 +287,15 @@ class FeedFragment : BaseStateFragment<FeedState>() {
|
|||
requireContext(),
|
||||
if (showPlayedItems) R.drawable.ic_visibility_on else R.drawable.ic_visibility_off
|
||||
)
|
||||
MenuItemCompat.setTooltipText(
|
||||
menuItem,
|
||||
getString(
|
||||
if (showPlayedItems)
|
||||
R.string.feed_toggle_hide_played_items
|
||||
else
|
||||
R.string.feed_toggle_show_played_items
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun updateToggleFutureItemsButton(menuItem: MenuItem) {
|
||||
|
@ -294,6 +304,15 @@ class FeedFragment : BaseStateFragment<FeedState>() {
|
|||
requireContext(),
|
||||
if (showFutureItems) R.drawable.ic_history_future else R.drawable.ic_history
|
||||
)
|
||||
MenuItemCompat.setTooltipText(
|
||||
menuItem,
|
||||
getString(
|
||||
if (showPlayedItems)
|
||||
R.string.feed_toggle_hide_future_items
|
||||
else
|
||||
R.string.feed_toggle_show_future_items
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -684,6 +684,7 @@
|
|||
\n
|
||||
\nSo the choice boils down to what you prefer: speed or precise information.</string>
|
||||
<string name="feed_toggle_show_played_items">Show watched items</string>
|
||||
<string name="feed_toggle_hide_played_items">Hide watched items</string>
|
||||
<string name="content_not_supported">This content is not yet supported by NewPipe.\n\nIt will hopefully be supported in a future version.</string>
|
||||
<string name="detail_sub_channel_thumbnail_view_description">Channel\'s avatar thumbnail</string>
|
||||
<string name="channel_created_by">Created by %s</string>
|
||||
|
@ -746,5 +747,6 @@
|
|||
<string name="select_quality_external_players">Select quality for external players</string>
|
||||
<string name="unknown_format">Unknown format</string>
|
||||
<string name="unknown_quality">Unknown quality</string>
|
||||
<string name="feed_toggle_show_future_items">Show future videos</string>
|
||||
<string name="feed_toggle_show_future_items">Show future items</string>
|
||||
<string name="feed_toggle_hide_future_items">Hide future items</string>
|
||||
</resources>
|
Ładowanie…
Reference in New Issue