mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-21 05:29:29 +02:00
@@ -58,6 +58,19 @@ android {
|
|||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flavorDimensions "flavor"
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
github {
|
||||||
|
dimension "flavor"
|
||||||
|
applicationIdSuffix ""
|
||||||
|
}
|
||||||
|
fdroid {
|
||||||
|
dimension "flavor"
|
||||||
|
applicationIdSuffix ".fdroid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
||||||
|
@@ -45,6 +45,7 @@ List<MapEntry<Locale, String>> supportedLocales = const [
|
|||||||
];
|
];
|
||||||
const fallbackLocale = Locale('en');
|
const fallbackLocale = Locale('en');
|
||||||
const localeDir = 'assets/translations';
|
const localeDir = 'assets/translations';
|
||||||
|
var fdroid = false;
|
||||||
|
|
||||||
final globalNavigatorKey = GlobalKey<NavigatorState>();
|
final globalNavigatorKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
@@ -133,20 +134,22 @@ class _ObtainiumState extends State<Obtainium> {
|
|||||||
logs.add('This is the first ever run of Obtainium.');
|
logs.add('This is the first ever run of Obtainium.');
|
||||||
// If this is the first run, ask for notification permissions and add Obtainium to the Apps list
|
// If this is the first run, ask for notification permissions and add Obtainium to the Apps list
|
||||||
Permission.notification.request();
|
Permission.notification.request();
|
||||||
appsProvider.saveApps([
|
if (!fdroid) {
|
||||||
App(
|
appsProvider.saveApps([
|
||||||
obtainiumId,
|
App(
|
||||||
'https://github.com/ImranR98/Obtainium',
|
obtainiumId,
|
||||||
'ImranR98',
|
'https://github.com/ImranR98/Obtainium',
|
||||||
'Obtainium',
|
'ImranR98',
|
||||||
currentReleaseTag,
|
'Obtainium',
|
||||||
currentReleaseTag,
|
currentReleaseTag,
|
||||||
[],
|
currentReleaseTag,
|
||||||
0,
|
[],
|
||||||
{'includePrereleases': true},
|
0,
|
||||||
null,
|
{'includePrereleases': true},
|
||||||
false)
|
null,
|
||||||
], onlyIfExists: false);
|
false)
|
||||||
|
], onlyIfExists: false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!supportedLocales
|
if (!supportedLocales
|
||||||
.map((e) => e.key.languageCode)
|
.map((e) => e.key.languageCode)
|
||||||
|
6
lib/main_fdroid.dart
Normal file
6
lib/main_fdroid.dart
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import 'main.dart' as m;
|
||||||
|
|
||||||
|
void main() async {
|
||||||
|
m.fdroid = true;
|
||||||
|
m.main();
|
||||||
|
}
|
Reference in New Issue
Block a user