Loading app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java +41 −11 Original line number Diff line number Diff line Loading @@ -183,7 +183,8 @@ public class PinnedTimelineHelper { } } } if (extraFeatures) { //Create other default timelines try { Pinned pinnedAll = new Pinned(activity).getAllPinned(Helper.getCurrentAccount(activity)); if (pinnedAll == null) { Loading @@ -192,6 +193,8 @@ public class PinnedTimelineHelper { pinnedAll.instance = currentInstance; pinnedAll.pinnedTimelines = new ArrayList<>(); } if (extraFeatures) { //Bubble timeline boolean createDefaultBubbleAtTop = true; for (PinnedTimeline pinnedTimeline : pinnedAll.pinnedTimelines) { if (pinnedTimeline.type == Timeline.TimeLineEnum.BUBBLE) { Loading @@ -211,10 +214,33 @@ public class PinnedTimelineHelper { new Pinned(activity).insertPinned(pinned); } } } //Trend timeline boolean createDefaultTrendAtTop = true; for (PinnedTimeline pinnedTimeline : pinnedAll.pinnedTimelines) { if (pinnedTimeline.type == Timeline.TimeLineEnum.TREND_MESSAGE) { createDefaultTrendAtTop = false; break; } } if (createDefaultTrendAtTop) { PinnedTimeline pinnedTimelineBubble = new PinnedTimeline(); pinnedTimelineBubble.type = Timeline.TimeLineEnum.TREND_MESSAGE; pinnedTimelineBubble.position = pinnedAll.pinnedTimelines != null ? pinnedAll.pinnedTimelines.size() : 0; pinned.pinnedTimelines.add(pinnedTimelineBubble); boolean exist = new Pinned(activity).pinnedExist(pinned); if (exist) { new Pinned(activity).updatePinned(pinned); } else { new Pinned(activity).insertPinned(pinned); } } } catch (DBException e) { e.printStackTrace(); } } sortPositionAsc(pinnedTimelines); //Check if changes occurred, if mastodonLists is null it does need, because it is the first call to draw pinned Loading Loading @@ -413,6 +439,9 @@ public class PinnedTimelineHelper { case BUBBLE: tabCustomDefaultViewBinding.icon.setImageResource(R.drawable.ic_baseline_bubble_chart_24); break; case TREND_MESSAGE: tabCustomDefaultViewBinding.icon.setImageResource(R.drawable.baseline_moving_24); break; } tab.setCustomView(tabCustomDefaultViewBinding.getRoot()); } Loading Loading @@ -535,6 +564,7 @@ public class PinnedTimelineHelper { break; case HOME: case LOCAL: case TREND_MESSAGE: case PUBLIC: defaultClick(activity, pinnedTimelineVisibleList.get(position).type, v, activityMainBinding, finalI); break; Loading app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java +4 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,10 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol holder.binding.icon.setImageResource(R.drawable.ic_baseline_bubble_chart_24); holder.binding.text.setText(R.string.bubble); break; case TREND_MESSAGE: holder.binding.icon.setImageResource(R.drawable.baseline_moving_24); holder.binding.text.setText(R.string.trending); break; } Loading app/src/main/res/drawables/mastodon/drawable/baseline_moving_24.xml 0 → 100644 +5 −0 Original line number Diff line number Diff line <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="?attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> <path android:fillColor="@android:color/white" android:pathData="M19.71,9.71L22,12V6h-6l2.29,2.29l-4.17,4.17c-0.39,0.39 -1.02,0.39 -1.41,0l-1.17,-1.17c-1.17,-1.17 -3.07,-1.17 -4.24,0L2,16.59L3.41,18l5.29,-5.29c0.39,-0.39 1.02,-0.39 1.41,0l1.17,1.17c1.17,1.17 3.07,1.17 4.24,0L19.71,9.71z"/> </vector> Loading
app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java +41 −11 Original line number Diff line number Diff line Loading @@ -183,7 +183,8 @@ public class PinnedTimelineHelper { } } } if (extraFeatures) { //Create other default timelines try { Pinned pinnedAll = new Pinned(activity).getAllPinned(Helper.getCurrentAccount(activity)); if (pinnedAll == null) { Loading @@ -192,6 +193,8 @@ public class PinnedTimelineHelper { pinnedAll.instance = currentInstance; pinnedAll.pinnedTimelines = new ArrayList<>(); } if (extraFeatures) { //Bubble timeline boolean createDefaultBubbleAtTop = true; for (PinnedTimeline pinnedTimeline : pinnedAll.pinnedTimelines) { if (pinnedTimeline.type == Timeline.TimeLineEnum.BUBBLE) { Loading @@ -211,10 +214,33 @@ public class PinnedTimelineHelper { new Pinned(activity).insertPinned(pinned); } } } //Trend timeline boolean createDefaultTrendAtTop = true; for (PinnedTimeline pinnedTimeline : pinnedAll.pinnedTimelines) { if (pinnedTimeline.type == Timeline.TimeLineEnum.TREND_MESSAGE) { createDefaultTrendAtTop = false; break; } } if (createDefaultTrendAtTop) { PinnedTimeline pinnedTimelineBubble = new PinnedTimeline(); pinnedTimelineBubble.type = Timeline.TimeLineEnum.TREND_MESSAGE; pinnedTimelineBubble.position = pinnedAll.pinnedTimelines != null ? pinnedAll.pinnedTimelines.size() : 0; pinned.pinnedTimelines.add(pinnedTimelineBubble); boolean exist = new Pinned(activity).pinnedExist(pinned); if (exist) { new Pinned(activity).updatePinned(pinned); } else { new Pinned(activity).insertPinned(pinned); } } } catch (DBException e) { e.printStackTrace(); } } sortPositionAsc(pinnedTimelines); //Check if changes occurred, if mastodonLists is null it does need, because it is the first call to draw pinned Loading Loading @@ -413,6 +439,9 @@ public class PinnedTimelineHelper { case BUBBLE: tabCustomDefaultViewBinding.icon.setImageResource(R.drawable.ic_baseline_bubble_chart_24); break; case TREND_MESSAGE: tabCustomDefaultViewBinding.icon.setImageResource(R.drawable.baseline_moving_24); break; } tab.setCustomView(tabCustomDefaultViewBinding.getRoot()); } Loading Loading @@ -535,6 +564,7 @@ public class PinnedTimelineHelper { break; case HOME: case LOCAL: case TREND_MESSAGE: case PUBLIC: defaultClick(activity, pinnedTimelineVisibleList.get(position).type, v, activityMainBinding, finalI); break; Loading
app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java +4 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,10 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol holder.binding.icon.setImageResource(R.drawable.ic_baseline_bubble_chart_24); holder.binding.text.setText(R.string.bubble); break; case TREND_MESSAGE: holder.binding.icon.setImageResource(R.drawable.baseline_moving_24); holder.binding.text.setText(R.string.trending); break; } Loading
app/src/main/res/drawables/mastodon/drawable/baseline_moving_24.xml 0 → 100644 +5 −0 Original line number Diff line number Diff line <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="?attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> <path android:fillColor="@android:color/white" android:pathData="M19.71,9.71L22,12V6h-6l2.29,2.29l-4.17,4.17c-0.39,0.39 -1.02,0.39 -1.41,0l-1.17,-1.17c-1.17,-1.17 -3.07,-1.17 -4.24,0L2,16.59L3.41,18l5.29,-5.29c0.39,-0.39 1.02,-0.39 1.41,0l1.17,1.17c1.17,1.17 3.07,1.17 4.24,0L19.71,9.71z"/> </vector>