Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hint to improve discoverability of subscription import #9501

Merged
merged 3 commits into from
Dec 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ import org.schabi.newpipe.local.subscription.SubscriptionViewModel.SubscriptionS
import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog
import org.schabi.newpipe.local.subscription.dialog.FeedGroupReorderDialog
import org.schabi.newpipe.local.subscription.item.ChannelItem
import org.schabi.newpipe.local.subscription.item.EmptyPlaceholderItem
import org.schabi.newpipe.local.subscription.item.FeedGroupAddNewGridItem
import org.schabi.newpipe.local.subscription.item.FeedGroupAddNewItem
import org.schabi.newpipe.local.subscription.item.FeedGroupCardGridItem
import org.schabi.newpipe.local.subscription.item.FeedGroupCardItem
import org.schabi.newpipe.local.subscription.item.FeedGroupCarouselItem
import org.schabi.newpipe.local.subscription.item.GroupsHeader
import org.schabi.newpipe.local.subscription.item.Header
import org.schabi.newpipe.local.subscription.item.ImportSubscriptionsHintPlaceholderItem
import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService
import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService
import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_MODE
Expand Down Expand Up @@ -312,7 +312,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
groupAdapter.add(this)
}

subscriptionsSection.setPlaceholder(EmptyPlaceholderItem())
subscriptionsSection.setPlaceholder(ImportSubscriptionsHintPlaceholderItem())
subscriptionsSection.setHideWhenEmpty(true)

groupAdapter.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.
import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialog.ScreenState.SubscriptionsPickerScreen
import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialogViewModel.DialogEvent.ProcessingEvent
import org.schabi.newpipe.local.subscription.dialog.FeedGroupDialogViewModel.DialogEvent.SuccessEvent
import org.schabi.newpipe.local.subscription.item.EmptyPlaceholderItem
import org.schabi.newpipe.local.subscription.item.ImportSubscriptionsHintPlaceholderItem
import org.schabi.newpipe.local.subscription.item.PickerIconItem
import org.schabi.newpipe.local.subscription.item.PickerSubscriptionItem
import org.schabi.newpipe.util.DeviceUtils
Expand Down Expand Up @@ -338,7 +338,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable {

if (subscriptions.isEmpty()) {
subscriptionEmptyFooter.clear()
subscriptionEmptyFooter.add(EmptyPlaceholderItem())
subscriptionEmptyFooter.add(ImportSubscriptionsHintPlaceholderItem())
} else {
subscriptionEmptyFooter.clear()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import com.xwray.groupie.viewbinding.BindableItem
import org.schabi.newpipe.R
import org.schabi.newpipe.databinding.ListEmptyViewBinding

class EmptyPlaceholderItem : BindableItem<ListEmptyViewBinding>() {
override fun getLayout(): Int = R.layout.list_empty_view
/**
* When there are no subscriptions, show a hint to the user about how to import subscriptions
*/
class ImportSubscriptionsHintPlaceholderItem : BindableItem<ListEmptyViewBinding>() {
override fun getLayout(): Int = R.layout.list_empty_view_subscriptions
override fun bind(viewBinding: ListEmptyViewBinding, position: Int) {}
override fun getSpanSize(spanCount: Int, position: Int): Int = spanCount
override fun initializeViewBinding(view: View) = ListEmptyViewBinding.bind(view)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/list_empty_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="6dp"
android:text="@string/empty_subscription_feed_subtitle" />
android:gravity="center"
android:paddingHorizontal="16dp"
android:text="@string/empty_list_subtitle" />
</LinearLayout>
25 changes: 25 additions & 0 deletions app/src/main/res/layout/list_empty_view_subscriptions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="128dp"
android:orientation="vertical">

<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¯\\_(ツ)_/¯"
android:textAppearance="?android:attr/textAppearanceLarge"
tools:ignore="HardcodedText" />

<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="6dp"
android:gravity="center"
android:paddingHorizontal="16dp"
android:text="@string/import_subscriptions_hint" />
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<string name="your_comment">تعليقك (باللغة الإنجليزية):</string>
<string name="error_details_headline">التفاصيل:</string>
<string name="search_no_results">لم يتم العثور على نتائج</string>
<string name="empty_subscription_feed_subtitle">لا شيء هنا سوى الصراصير</string>
<string name="empty_list_subtitle">لا شيء هنا سوى الصراصير</string>
<string name="audio">الصوت</string>
<string name="retry">إعادة المحاولة</string>
<string name="short_thousand">ألف</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-az/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
<string name="video_streams_empty">Video yayımı tapılmadı</string>
<string name="comments_tab_description">Şərhlər</string>
<string name="description_tab_description">Açıqlama</string>
<string name="empty_subscription_feed_subtitle">Burada kriketlərdən başqa heç nə yoxdur</string>
<string name="empty_list_subtitle">Burada kriketlərdən başqa heç nə yoxdur</string>
<string name="search_no_results">Nəticə yoxdur</string>
<string name="restore_defaults">İlkin tənzimləmələri qaytar</string>
<string name="missing_file">Fayl köçürüldü və ya silindi</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-b+ast/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<string name="best_resolution">La meyor resolución</string>
<string name="notification_channel_name">Avisu permanente de NewPipe</string>
<string name="search_no_results">Nun hai resultaos</string>
<string name="empty_subscription_feed_subtitle">Equí nun hai más que grillos</string>
<string name="empty_list_subtitle">Equí nun hai más que grillos</string>
<plurals name="subscribers">
<item quantity="one">%s soscriptor</item>
<item quantity="other">%s soscriptores</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-b+uz+Latn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
<string name="audio">Audio</string>
<string name="video">Video</string>
<string name="detail_drag_description">Qayta tartiblash uchun tortish</string>
<string name="empty_subscription_feed_subtitle">Bu erda kriketlardan boshqa hech narsa yo\'q</string>
<string name="empty_list_subtitle">Bu erda kriketlardan boshqa hech narsa yo\'q</string>
<string name="search_no_results">Natija yo\'q</string>
<string name="detail_dislikes_img_view_description">Dislayklar</string>
<string name="detail_likes_img_view_description">Layklar</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<string name="detail_likes_img_view_description">Спадабалася</string>
<string name="detail_dislikes_img_view_description">Не спадабалася</string>
<string name="search_no_results">Няма вынікаў</string>
<string name="empty_subscription_feed_subtitle">Нічога няма</string>
<string name="empty_list_subtitle">Нічога няма</string>
<string name="detail_drag_description">Перацягніце, каб змяніць парадак</string>
<string name="video">Відэа</string>
<string name="audio">Аўдыё</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<string name="detail_likes_img_view_description">Харесвания</string>
<string name="detail_dislikes_img_view_description">Нехаресвания</string>
<string name="search_no_results">Няма резултати</string>
<string name="empty_subscription_feed_subtitle">Тук няма нищо</string>
<string name="empty_list_subtitle">Тук няма нищо</string>
<string name="video">Видео</string>
<string name="audio">Аудио</string>
<string name="retry">Опитай отново</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-bn-rBD/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
<string name="error_report_notification_toast">সমস্যা হয়েছে, নোটিফিকেশন দেখুন</string>
<string name="copy_for_github">তৈরিকৃত রিপোর্ট কপি করো</string>
<string name="related_items_tab_description">সম্পর্কিত আইটেমসমূহ</string>
<string name="empty_subscription_feed_subtitle">ঝিঁঝিঁপোকা ছাড়া এখানে কিছু নেই</string>
<string name="empty_list_subtitle">ঝিঁঝিঁপোকা ছাড়া এখানে কিছু নেই</string>
<string name="detail_drag_description">পুনর্বিন্যাস্ত করতে টান দিন</string>
<string name="subscribers_count_not_available">গ্রাহকসংখ্যা সুলভ নয়</string>
<string name="no_one_watching">কেউ দেখছে না</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
<string name="no_one_listening">কেউ শুনছে না</string>
<string name="no_one_watching">কেউ দেখছে না</string>
<string name="drawer_header_description">সেবাটি পরিবর্তন করো, বর্তমানে নির্বাচিত:</string>
<string name="empty_subscription_feed_subtitle">ঝিঝিপোকা ছাড়া কিছুই নেই এখানে</string>
<string name="empty_list_subtitle">ঝিঝিপোকা ছাড়া কিছুই নেই এখানে</string>
<string name="invalid_source">এই ধরনের কোন ফাইল/বিষয়বস্তুর উৎস নেই</string>
<string name="player_unrecoverable_failure">অপুনরুদ্ধারযোগ্য প্লেয়ার ত্রুটি ঘটেছে</string>
<string name="peertube_instance_add_fail">ইন্সট্যান্সটি যাচাই করা যায়নি</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<string name="detail_likes_img_view_description">M\'agrada</string>
<string name="detail_dislikes_img_view_description">No m\'agrada</string>
<string name="search_no_results">Cap resultat</string>
<string name="empty_subscription_feed_subtitle">No hi ha res aquí</string>
<string name="empty_list_subtitle">No hi ha res aquí</string>
<string name="retry">Torna a provar</string>
<string name="no_subscribers">Cap subscripció</string>
<string name="no_views">Cap reproducció</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ckb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
<string name="most_liked">زۆرترین بەدڵ</string>
<string name="delete">سڕینەوە</string>
<string name="default_video_format_title">جۆری بنەڕەتی ڤیدیۆ</string>
<string name="empty_subscription_feed_subtitle">هیچ شتێک لێرەدا نییە</string>
<string name="empty_list_subtitle">هیچ شتێک لێرەدا نییە</string>
<string name="clear">سڕینەوە</string>
<string name="invalid_directory">هەمان فۆڵدەر بوونی نییە</string>
<string name="bookmark_playlist">نیشانه‌كردنی خشته‌لێدان</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<string name="notification_channel_name">Oznámení NewPipe</string>
<string name="notification_channel_description">Oznámení pro NewPipe přehrávač</string>
<string name="search_no_results">Žádné výsledky</string>
<string name="empty_subscription_feed_subtitle">Je tu sranda jak v márnici</string>
<string name="empty_list_subtitle">Je tu sranda jak v márnici</string>
<string name="short_billion">mld.</string>
<string name="no_subscribers">Žádní odběratelé</string>
<plurals name="subscribers">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
<string name="error_postprocessing_failed">Efterbehandling fejlede</string>
<string name="stop">Stop</string>
<string name="events">Hændelser</string>
<string name="empty_subscription_feed_subtitle">Intet at se her</string>
<string name="empty_list_subtitle">Intet at se her</string>
<string name="short_thousand">t</string>
<string name="short_million">mio.</string>
<string name="short_billion">mia.</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<string name="charset_most_special_characters">Die meisten Sonderzeichen</string>
<string name="resume_on_audio_focus_gain_title">Wiedergabe fortsetzen</string>
<string name="settings_category_player_title">Player</string>
<string name="empty_subscription_feed_subtitle">Nichts hier, außer dem Zirpen der Grillen</string>
<string name="empty_list_subtitle">Nichts hier, außer dem Zirpen der Grillen</string>
<string name="delete_item_search_history">Möchtest du dieses Element aus dem Suchverlauf löschen\?</string>
<string name="blank_page_summary">Leere Seite</string>
<string name="select_a_channel">Einen Kanal auswählen</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<string name="error_snackbar_message">Συγγνώμη, κάτι πήγε στραβά.</string>
<string name="info_labels">Τι:\\nΑίτημα:\\nΓλώσσα περιεχομένου:\\nΧώρα περιεχομένου:\\nΓλώσσα εφαρμογής:\\nΥπηρεσία:\\nΏρα GMT:\\nΠακέτο:\\nΈκδοση:\\nΈκδοση λειτουργικού συστήματος:</string>
<string name="search_no_results">Κανένα αποτέλεσμα</string>
<string name="empty_subscription_feed_subtitle">Δεν υπάρχει τίποτα εδώ</string>
<string name="empty_list_subtitle">Δεν υπάρχει τίποτα εδώ</string>
<string name="detail_drag_description">Σύρετε για ταξινόμηση</string>
<string name="retry">Προσπάθεια εκ νέου</string>
<string name="short_thousand">χιλ.</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-eo/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
<string name="title_activity_history">Historio</string>
<string name="action_history">Historio</string>
<string name="search_no_results">Neniuj rezultoj</string>
<string name="empty_subscription_feed_subtitle">Neniu enhavo</string>
<string name="empty_list_subtitle">Neniu enhavo</string>
<string name="no_subscribers">Neniuj abonantoj</string>
<plurals name="subscribers">
<item quantity="one">%s abonanto</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
<string name="settings_category_history_title">Historial y caché</string>
<string name="undo">Deshacer</string>
<string name="search_no_results">No hay resultados</string>
<string name="empty_subscription_feed_subtitle">Nada aquí más que grillos</string>
<string name="empty_list_subtitle">Nada aquí más que grillos</string>
<string name="no_subscribers">Sin suscriptores</string>
<plurals name="subscribers">
<item quantity="one">%s suscriptor</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-et/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<string name="detail_likes_img_view_description">Meeldib</string>
<string name="detail_dislikes_img_view_description">Ei meeldi</string>
<string name="search_no_results">Tulemusi pole</string>
<string name="empty_subscription_feed_subtitle">Siin pole veel midagi</string>
<string name="empty_list_subtitle">Siin pole veel midagi</string>
<string name="detail_drag_description">Lohista järjestuse muutmiseks</string>
<string name="video">Video</string>
<string name="audio">Audio</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-eu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<string name="undo">Desegin</string>
<string name="notification_channel_description">NewPipe erreproduzigailuaren jakinarazpenak</string>
<string name="search_no_results">Emaitzarik ez</string>
<string name="empty_subscription_feed_subtitle">Kilkerrak besterik ez daude hemen</string>
<string name="empty_list_subtitle">Kilkerrak besterik ez daude hemen</string>
<string name="no_subscribers">Harpidedunik ez</string>
<plurals name="subscribers">
<item quantity="one">Harpidedun %s</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
<string name="copyright" formatted="true">© %1$s توسط %2$s تحت %3$s</string>
<string name="contribution_encouragement">اگر ایده‌ای برای ترجمه، تغییر طراحی، پاک‌سازی کد و یا تغییرات واقعا سنگین کدنویسی دارید، از کمک‌تان همواره استقبال می‌کنیم. هر چه بیشتر کار کنیم، نتایج بهتری می‌گیریم!</string>
<string name="notification_channel_description">آگاهی‌ها برای پخش‌کنندهٔ نیوپایپ</string>
<string name="empty_subscription_feed_subtitle">چیزی جز کریکت اینجا نیست</string>
<string name="empty_list_subtitle">چیزی جز کریکت اینجا نیست</string>
<string name="no_subscribers">فاقد مشترک</string>
<string name="player_unrecoverable_failure">خطای عدم احیای پخش‌کننده رخ داد</string>
<string name="player_recoverable_failure">در حال احیا از خطای پخش‌کننده</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<string name="detail_likes_img_view_description">Tykkäykset</string>
<string name="detail_dislikes_img_view_description">Ei-tykkäykset</string>
<string name="search_no_results">Ei tuloksia</string>
<string name="empty_subscription_feed_subtitle">Tyhjää täynnä</string>
<string name="empty_list_subtitle">Tyhjää täynnä</string>
<string name="video">Video</string>
<string name="audio">Ääni</string>
<string name="retry">Toista uudelleen</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<string name="settings_category_history_title">Historique et cache</string>
<string name="notification_channel_description">Notifications pour le lecteur de NewPipe</string>
<string name="search_no_results">Aucun résultat</string>
<string name="empty_subscription_feed_subtitle">Aucun contenu</string>
<string name="empty_list_subtitle">Aucun contenu</string>
<string name="no_subscribers">Aucun abonné</string>
<plurals name="subscribers">
<item quantity="one">%s abonné</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-gl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<string name="detail_likes_img_view_description">Gosto</string>
<string name="detail_dislikes_img_view_description">Non gosto</string>
<string name="search_no_results">Non hai resultados</string>
<string name="empty_subscription_feed_subtitle">Nada que ver aquí</string>
<string name="empty_list_subtitle">Nada que ver aquí</string>
<string name="detail_drag_description">Arrastre para reordenar</string>
<string name="video">Vídeo</string>
<string name="audio">Audio</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-he/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<string name="detail_likes_img_view_description">אהבו</string>
<string name="detail_dislikes_img_view_description">לא אהבו</string>
<string name="search_no_results">אין תוצאות</string>
<string name="empty_subscription_feed_subtitle">אין כאן כלום מלבד צרצרים</string>
<string name="empty_list_subtitle">אין כאן כלום מלבד צרצרים</string>
<string name="video">סרטון</string>
<string name="audio">שמע</string>
<string name="retry">ניסיון חוזר</string>
Expand Down
Loading