Broadcasts now cause a refresh on timelines after a post is composed instead of listeners.
As a side effect, pagers don't have to keep track of "registered fragments", which was a bad idea and caused crashes.
This commit is contained in:
parent
9c56f0e7bc
commit
a4ee128e26
8 changed files with 36 additions and 108 deletions
|
@ -94,7 +94,7 @@ public class ViewThreadFragment extends SFragment implements
|
|||
mastodonApi = null;
|
||||
thisThreadsStatusId = null;
|
||||
|
||||
timelineReceiver = new TimelineReceiver(adapter);
|
||||
timelineReceiver = new TimelineReceiver(adapter, this);
|
||||
LocalBroadcastManager.getInstance(context.getApplicationContext())
|
||||
.registerReceiver(timelineReceiver, TimelineReceiver.getFilter(null));
|
||||
|
||||
|
@ -187,12 +187,6 @@ public class ViewThreadFragment extends SFragment implements
|
|||
sendThreadRequest(thisThreadsStatusId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccessfulStatus() {
|
||||
onRefresh();
|
||||
super.onSuccessfulStatus();
|
||||
}
|
||||
|
||||
public void onReply(int position) {
|
||||
super.reply(adapter.getItem(position));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue