More crash fixes
This commit is contained in:
parent
9b2f50d726
commit
6e6f73f2c0
|
@ -10,7 +10,7 @@ android {
|
|||
applicationId "org.joinmastodon.android"
|
||||
minSdk 23
|
||||
targetSdk 31
|
||||
versionCode 23
|
||||
versionCode 24
|
||||
versionName "0.1"
|
||||
}
|
||||
|
||||
|
|
|
@ -45,3 +45,5 @@
|
|||
}
|
||||
|
||||
-keep class org.joinmastodon.android.AppCenterWrapper { *; }
|
||||
|
||||
-keepattributes LineNumberTable
|
|
@ -48,6 +48,8 @@ public class HomeTimelineFragment extends StatusListFragment{
|
|||
.getHomeTimeline(offset>0 ? getMaxID() : null, count, refreshing, new SimpleCallback<>(this){
|
||||
@Override
|
||||
public void onSuccess(List<Status> result){
|
||||
if(getActivity()==null)
|
||||
return;
|
||||
onDataLoaded(result, !result.isEmpty());
|
||||
}
|
||||
});
|
||||
|
|
|
@ -103,6 +103,8 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
|
|||
.getNotifications(offset>0 ? getMaxID() : null, count, onlyMentions, refreshing, new SimpleCallback<>(this){
|
||||
@Override
|
||||
public void onSuccess(List<Notification> result){
|
||||
if(getActivity()==null)
|
||||
return;
|
||||
if(refreshing)
|
||||
relationships.clear();
|
||||
onDataLoaded(result.stream().filter(n->n.type!=null).collect(Collectors.toList()), !result.isEmpty());
|
||||
|
|
|
@ -121,6 +121,15 @@ public class DiscoverAccountsFragment extends BaseRecyclerFragment<DiscoverAccou
|
|||
}).exec(accountID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView(){
|
||||
super.onDestroyView();
|
||||
if(relationshipsRequest!=null){
|
||||
relationshipsRequest.cancel();
|
||||
relationshipsRequest=null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scrollToTop(){
|
||||
smoothScrollRecyclerViewToTop(list);
|
||||
|
|
Loading…
Reference in New Issue