Someone else's code throwing too many exceptions again, yay

This commit is contained in:
Grishka 2024-07-10 02:48:33 +03:00
parent 0182763b58
commit a9ef1f9d47
3 changed files with 5 additions and 7 deletions

View File

@ -13,7 +13,7 @@ android {
applicationId "org.joinmastodon.android" applicationId "org.joinmastodon.android"
minSdk 23 minSdk 23
targetSdk 34 targetSdk 34
versionCode 110 versionCode 111
versionName "2.6.0" versionName "2.6.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -278,7 +278,6 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD
}); });
if(GithubSelfUpdater.needSelfUpdating()){ if(GithubSelfUpdater.needSelfUpdating()){
E.register(this);
updateUpdateState(GithubSelfUpdater.getInstance().getState()); updateUpdateState(GithubSelfUpdater.getInstance().getState());
} }
if(currentDonationCampaign!=null) if(currentDonationCampaign!=null)
@ -634,9 +633,6 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD
@Override @Override
public void onDestroyView(){ public void onDestroyView(){
super.onDestroyView(); super.onDestroyView();
if(GithubSelfUpdater.needSelfUpdating()){
E.unregister(this);
}
donationBanner=null; donationBanner=null;
donationBannerDismissing=false; donationBannerDismissing=false;
} }

View File

@ -45,9 +45,11 @@ public abstract class WebViewFragment extends LoaderFragment{
@Override @Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error){ public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error){
if(!loaded){
onError(new MastodonErrorResponse(error.getDescription().toString(), -1, null)); onError(new MastodonErrorResponse(error.getDescription().toString(), -1, null));
updateBackCallback(); updateBackCallback();
} }
}
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request){ public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request){