forked from mirrors/Fedilab
Tag cannot be pinned
This commit is contained in:
parent
39f248e0a6
commit
bc8dfec325
1 changed files with 13 additions and 12 deletions
|
@ -105,21 +105,22 @@ public class HashTagActivity extends BaseActivity {
|
|||
});
|
||||
ReorderVM reorderVM = new ViewModelProvider(HashTagActivity.this).get(ReorderVM.class);
|
||||
reorderVM.getAllPinned().observe(HashTagActivity.this, pinned -> {
|
||||
if (pinned != null) {
|
||||
this.pinned = pinned;
|
||||
pinnedTag = false;
|
||||
if (pinned.pinnedTimelines != null) {
|
||||
for (PinnedTimeline pinnedTimeline : pinned.pinnedTimelines) {
|
||||
if (pinnedTimeline.tagTimeline != null) {
|
||||
if (pinnedTimeline.tagTimeline.name.equalsIgnoreCase(stripTag)) {
|
||||
this.pinnedTimeline = pinnedTimeline;
|
||||
pinnedTag = true;
|
||||
break;
|
||||
}
|
||||
if (pinned == null) {
|
||||
pinned = new Pinned();
|
||||
pinned.pinnedTimelines = new ArrayList<>();
|
||||
}
|
||||
pinnedTag = false;
|
||||
if (pinned.pinnedTimelines != null) {
|
||||
for (PinnedTimeline pinnedTimeline : pinned.pinnedTimelines) {
|
||||
if (pinnedTimeline.tagTimeline != null) {
|
||||
if (pinnedTimeline.tagTimeline.name.equalsIgnoreCase(stripTag)) {
|
||||
this.pinnedTimeline = pinnedTimeline;
|
||||
pinnedTag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
});
|
||||
if (MainActivity.filterFetched && MainActivity.mainFilters != null) {
|
||||
|
|
Loading…
Reference in a new issue