Switch OTA and source code URLs to git.vpnghost.space

This commit is contained in:
instant992 2026-06-23 01:30:49 +04:00
parent 214b50e781
commit b180b7bc30
2 changed files with 15 additions and 15 deletions

View file

@ -29,9 +29,9 @@ import java.util.regex.Pattern;
public class UpdateHelper extends BaseRemoteHelper {
public static final String UPDATE_METHOD = "check_for_updates";
// GitHub repository that hosts FoxiGram releases.
private static final String GITHUB_REPO = "instant992/FoxiGram";
private static final String RELEASES_API = "https://api.github.com/repos/" + GITHUB_REPO + "/releases/latest";
// Gitea repository that hosts FoxiGram releases.
private static final String GITHUB_REPO = "Ghost552/FoxiGram";
private static final String RELEASES_API = "https://git.vpnghost.space/api/v1/repos/" + GITHUB_REPO + "/releases/latest";
private static final Pattern VERSION_PART = Pattern.compile("\\d+");
@ -124,7 +124,7 @@ public class UpdateHelper extends BaseRemoteHelper {
URL url = new URL(RELEASES_API);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept", "application/vnd.github+json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("User-Agent", ApplicationLoader.getApplicationId());
connection.setConnectTimeout(15000);
connection.setReadTimeout(15000);

View file

@ -154,23 +154,23 @@ public class NekoSettingsActivity extends BaseNekoSettingsActivity implements Fa
items.add(UItem.asCustomShadow(topView, 200 - 12));
items.add(UItem.asButton(generalRow, R.drawable.msg_media, LocaleController.getString(R.string.General)).slug("general"));
items.add(UItem.asButton(appearanceRow, R.drawable.msg_theme, LocaleController.getString(R.string.ChangeChannelNameColor2)).slug("appearance"));
items.add(UItem.asButton(chatRow, R.drawable.msg_discussion, LocaleController.getString(R.string.Chat)).slug("chat"));
items.add(UItem.asButton(generalRow, R.drawable.msg_media, LocaleController.getString(R.string.General)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.BLUE).slug("general"));
items.add(UItem.asButton(appearanceRow, R.drawable.msg_theme, LocaleController.getString(R.string.ChangeChannelNameColor2)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.PURPLE).slug("appearance"));
items.add(UItem.asButton(chatRow, R.drawable.msg_discussion, LocaleController.getString(R.string.Chat)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.GREEN).slug("chat"));
if (!PasscodeHelper.isSettingsHidden()) {
items.add(UItem.asButton(passcodeRow, R.drawable.msg_secret, LocaleController.getString(R.string.PasscodeNeko)).slug("passcode"));
items.add(UItem.asButton(passcodeRow, R.drawable.msg_secret, LocaleController.getString(R.string.PasscodeNeko)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.ORANGE).slug("passcode"));
}
items.add(UItem.asButton(experimentRow, R.drawable.msg_fave, LocaleController.getString(R.string.NotificationsOther)).slug("experiment"));
items.add(UItem.asButton(experimentRow, R.drawable.msg_fave, LocaleController.getString(R.string.NotificationsOther)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.RED).slug("experiment"));
AccessibilityManager am = (AccessibilityManager) ApplicationLoader.applicationContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
if (am != null && am.isTouchExplorationEnabled()) {
items.add(UItem.asButton(accessibilityRow, LocaleController.getString(R.string.AccessibilitySettings)).slug("accessibility"));
}
items.add(UItem.asShadow(null));
items.add(UItem.asButton(sourceCodeRow, R.drawable.msg_link, LocaleController.getString(R.string.ViewSourceCode), "GitHub").slug("sourceCode"));
items.add(UItem.asButtonSubtext(translationRow, R.drawable.msg_translate, LocaleController.getString(R.string.Translation), LocaleController.getString(R.string.TranslationAbout)).slug("translation"));
items.add(UItem.asButtonSubtext(donateRow, R.drawable.msg_input_like, LocaleController.getString(R.string.Donate), LocaleController.getString(R.string.DonateAbout)).slug("donate"));
items.add(UItem.asButtonSubtext(checkUpdateRow, R.drawable.msg_reset, LocaleController.getString(R.string.CheckUpdate), UpdateHelper.formatDateUpdate(SharedConfig.lastUpdateCheckTime)).slug("checkUpdate"));
items.add(UItem.asButton(sourceCodeRow, R.drawable.msg_link, LocaleController.getString(R.string.ViewSourceCode), "GitHub").colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.CYAN).slug("sourceCode"));
items.add(UItem.asButtonSubtext(translationRow, R.drawable.msg_translate, LocaleController.getString(R.string.Translation), LocaleController.getString(R.string.TranslationAbout)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.BLUE_DEEP).slug("translation"));
items.add(UItem.asButtonSubtext(donateRow, R.drawable.msg_input_like, LocaleController.getString(R.string.Donate), LocaleController.getString(R.string.DonateAbout)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.RED).slug("donate"));
items.add(UItem.asButtonSubtext(checkUpdateRow, R.drawable.msg_reset, LocaleController.getString(R.string.CheckUpdate), UpdateHelper.formatDateUpdate(SharedConfig.lastUpdateCheckTime)).colorfulIcon(org.telegram.ui.Components.IconBackgroundColors.GREEN).slug("checkUpdate"));
items.add(UItem.asShadow(null));
newsList.clear();
@ -222,7 +222,7 @@ public class NekoSettingsActivity extends BaseNekoSettingsActivity implements Fa
} else if (id == translationRow) {
Browser.openUrl(getParentActivity(), "https://neko.crowdin.com/nekogram");
} else if (id == sourceCodeRow) {
Browser.openUrl(getParentActivity(), "https://github.com/instant992/FoxiGram");
Browser.openUrl(getParentActivity(), "https://git.vpnghost.space/Ghost552/FoxiGram");
} else if (id >= sponsorRow) {
var news = newsList.get(id - sponsorRow);
Browser.openUrl(getParentActivity(), news.url);
@ -321,7 +321,7 @@ public class NekoSettingsActivity extends BaseNekoSettingsActivity implements Fa
}));
}));
searchResultList.add(new SearchResult(20002, LocaleController.getString(R.string.ViewSourceCode), "GitHub", R.drawable.msg2_help, () -> Browser.openUrl(getParentActivity(), "https://github.com/instant992/FoxiGram")));
searchResultList.add(new SearchResult(20002, LocaleController.getString(R.string.ViewSourceCode), "Gitea", R.drawable.msg2_help, () -> Browser.openUrl(getParentActivity(), "https://git.vpnghost.space/Ghost552/FoxiGram")));
searchResultList.add(new SearchResult(20003, LocaleController.getString(R.string.Translation), LocaleController.getString(R.string.TranslationAbout), R.drawable.msg2_help, () -> Browser.openUrl(getParentActivity(), "https://neko.crowdin.com/nekogram")));
searchResultList.add(new SearchResult(20004, LocaleController.getString(R.string.Donate), LocaleController.getString(R.string.DonateAbout), R.drawable.msg2_help, () -> presentFragment(new NekoDonateActivity())));