|
11 | 11 |
|
12 | 12 | import androidx.annotation.NonNull; |
13 | 13 | import androidx.annotation.Nullable; |
| 14 | +import androidx.compose.ui.platform.ComposeView; |
14 | 15 | import androidx.fragment.app.DialogFragment; |
15 | 16 | import androidx.recyclerview.widget.LinearLayoutManager; |
16 | 17 | import androidx.recyclerview.widget.RecyclerView; |
|
19 | 20 | import org.schabi.newpipe.database.subscription.SubscriptionEntity; |
20 | 21 | import org.schabi.newpipe.error.ErrorUtil; |
21 | 22 | import org.schabi.newpipe.local.subscription.SubscriptionManager; |
| 23 | +import org.schabi.newpipe.ui.emptystate.EmptyStateSpec; |
| 24 | +import org.schabi.newpipe.ui.emptystate.EmptyStateUtil; |
22 | 25 | import org.schabi.newpipe.util.ThemeHelper; |
23 | 26 | import org.schabi.newpipe.util.image.CoilHelper; |
24 | 27 |
|
@@ -57,7 +60,7 @@ public class SelectChannelFragment extends DialogFragment { |
57 | 60 | private OnCancelListener onCancelListener = null; |
58 | 61 |
|
59 | 62 | private ProgressBar progressBar; |
60 | | - private TextView emptyView; |
| 63 | + private ComposeView emptyView; |
61 | 64 | private RecyclerView recyclerView; |
62 | 65 |
|
63 | 66 | private List<SubscriptionEntity> subscriptions = new Vector<>(); |
@@ -91,6 +94,9 @@ public View onCreateView(@NonNull final LayoutInflater inflater, final ViewGroup |
91 | 94 |
|
92 | 95 | progressBar = v.findViewById(R.id.progressBar); |
93 | 96 | emptyView = v.findViewById(R.id.empty_state_view); |
| 97 | + |
| 98 | + EmptyStateUtil.setEmptyStateComposable(emptyView, |
| 99 | + EmptyStateSpec.Companion.getNoSubscriptions()); |
94 | 100 | progressBar.setVisibility(View.VISIBLE); |
95 | 101 | recyclerView.setVisibility(View.GONE); |
96 | 102 | emptyView.setVisibility(View.GONE); |
|
0 commit comments