Skip to content

Commit

Permalink
Revert "Removed Telegram App"
Browse files Browse the repository at this point in the history
This reverts commit 29bb5cc.
  • Loading branch information
ImranR98 committed Dec 20, 2024
1 parent 7432ee8 commit 966b1ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Currently supported App sources:
- Jenkins Jobs
- [APKMirror](https://apkmirror.com/) (Track-Only)
- Other - App-Specific:
- [Telegram App](https://telegram.org)
- [Neutron Code](https://neutroncode.com)
- Direct APK Link
- "HTML" (Fallback): Any other URL that returns an HTML page with links to APK files
Expand Down
18 changes: 2 additions & 16 deletions lib/providers/source_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import 'package:obtainium/app_sources/jenkins.dart';
import 'package:obtainium/app_sources/neutroncode.dart';
import 'package:obtainium/app_sources/sourceforge.dart';
import 'package:obtainium/app_sources/sourcehut.dart';
import 'package:obtainium/app_sources/telegramapp.dart';
import 'package:obtainium/app_sources/tencent.dart';
import 'package:obtainium/app_sources/uptodown.dart';
import 'package:obtainium/components/generated_form.dart';
Expand Down Expand Up @@ -258,22 +259,6 @@ appJSONCompatibilityModifiers(Map<String, dynamic> json) {
replacementAdditionalSettings['matchGroupToUse'] = "1";
additionalSettings = replacementAdditionalSettings;
}
// Telegram App from before it was removed should be converted to Direct APK Link (#1943)
if (json['url'] == 'https://telegram.org' &&
json['id'] == 'org.telegram.messenger.web' &&
json['author'] == 'Telegram' &&
json['name'] == 'Telegram' &&
json['overrideSource'] == null &&
additionalSettings['trackOnly'] == false &&
additionalSettings['versionExtractionRegEx'] == '' &&
json['lastUpdateCheck'] != null) {
json['url'] = 'https://telegram.org/dl/android/apk';
var newSource = DirectAPKLink();
json['overrideSource'] = newSource.runtimeType.toString();
var replacementAdditionalSettings = getDefaultValuesFromFormItems(
newSource.combinedAppSpecificSettingFormItems);
additionalSettings = replacementAdditionalSettings;
}
}
json['additionalSettings'] = jsonEncode(additionalSettings);
// F-Droid no longer needs cloudflare exception since override can be used - migrate apps appropriately
Expand Down Expand Up @@ -879,6 +864,7 @@ class SourceProvider {
Tencent(),
Jenkins(),
APKMirror(),
TelegramApp(),
NeutronCode(),
DirectAPKLink(),
HTML() // This should ALWAYS be the last option as they are tried in order
Expand Down

0 comments on commit 966b1ee

Please sign in to comment.