Revert "Getting changelogs commit number 1"

This reverts commit e8a31cf867.
This commit is contained in:
LucasGGamerM 2022-12-25 14:21:09 -03:00
parent 2b2e4845a1
commit f0ea6ef43e
3 changed files with 0 additions and 27 deletions

View File

@ -175,27 +175,6 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
}
}
public String getChangelog(){
String changelog = null;
Request req=new Request.Builder()
.url("https://api.github.com/repos/LucasGGamerM/moshidon/releases/latest")
.build();
Call call=MastodonAPIController.getHttpClient().newCall(req);
try(Response resp=call.execute()){
JsonObject obj=JsonParser.parseReader(resp.body().charStream()).getAsJsonObject();
changelog=obj.get("body").getAsString();
if(changelog == null){
Log.w(TAG, "No changelog available");
return null;
}
return changelog;
}catch(Exception x){
Log.w(TAG, "getChangelog: ", x);
}
return changelog;
}
private void setState(UpdateState state){
this.state=state;
E.post(new SelfUpdateStateChangedEvent(state));

View File

@ -49,7 +49,6 @@ import org.joinmastodon.android.ui.M3AlertDialogBuilder;
import org.joinmastodon.android.ui.OutlineProviders;
import org.joinmastodon.android.ui.utils.UiUtils;
import org.joinmastodon.android.updater.GithubSelfUpdater;
import org.w3c.dom.Text;
import java.util.ArrayList;
import java.util.function.Consumer;
@ -186,9 +185,6 @@ public class SettingsFragment extends MastodonToolbarFragment{
checkForUpdateItem = new TextItem(R.string.sk_check_for_update, GithubSelfUpdater.getInstance()::checkForUpdates);
items.add(checkForUpdateItem);
}
// TODO fix this up tomorrow, by probably just making another method for chacking and displaying the new changelog
items.add(new TextItem(R.string.get_changelog, GithubSelfUpdater.getInstance()::getChangelog);
items.add(new TextItem(R.string.sk_settings_contribute, ()->UiUtils.launchWebBrowser(getActivity(), "https://github.com/LucasGGamerM/moshidon")));
items.add(new TextItem(R.string.settings_clear_cache, this::clearImageCache));
items.add(new TextItem(R.string.sk_clear_recent_languages, ()->UiUtils.showConfirmationAlert(getActivity(), R.string.sk_clear_recent_languages, R.string.sk_confirm_clear_recent_languages, R.string.clear, ()->{

View File

@ -39,8 +39,6 @@ public abstract class GithubSelfUpdater{
public abstract void cancelDownload();
public abstract String getChangelog();
public abstract void handleIntentFromInstaller(Intent intent, Activity activity);
public enum UpdateState{