mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 05:23:28 +01:00 
			
		
		
		
	Add fdroid flavor
This commit is contained in:
		| @@ -59,6 +59,18 @@ android { | |||||||
|         versionName flutterVersionName |         versionName flutterVersionName | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     flavorDimensions "flavor" | ||||||
|  |  | ||||||
|  |     productFlavors { | ||||||
|  |         no { | ||||||
|  |             dimension "flavor" | ||||||
|  |             applicationIdSuffix "" | ||||||
|  |         } | ||||||
|  |         fdroid { | ||||||
|  |             dimension "flavor" | ||||||
|  |             applicationIdSuffix ".fdroid" | ||||||
|  |         } | ||||||
|  |     } | ||||||
|     signingConfigs { |     signingConfigs { | ||||||
|         release { |         release { | ||||||
|             keyAlias keystoreProperties['keyAlias'] |             keyAlias keystoreProperties['keyAlias'] | ||||||
|   | |||||||
| @@ -37,6 +37,7 @@ const supportedLocales = [ | |||||||
| ]; | ]; | ||||||
| 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>(); | ||||||
|  |  | ||||||
| @@ -195,6 +196,7 @@ class _ObtainiumState extends State<Obtainium> { | |||||||
|         logs.add(tr('firstRun')); |         logs.add(tr('firstRun')); | ||||||
|         // 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(); | ||||||
|  |         if (!fdroid) { | ||||||
|           appsProvider.saveApps([ |           appsProvider.saveApps([ | ||||||
|             App( |             App( | ||||||
|                 obtainiumId, |                 obtainiumId, | ||||||
| @@ -210,6 +212,7 @@ class _ObtainiumState extends State<Obtainium> { | |||||||
|                 false) |                 false) | ||||||
|           ]); |           ]); | ||||||
|         } |         } | ||||||
|  |       } | ||||||
|       // Register the background update task according to the user's setting |       // Register the background update task according to the user's setting | ||||||
|       if (existingUpdateInterval != settingsProvider.updateInterval) { |       if (existingUpdateInterval != settingsProvider.updateInterval) { | ||||||
|         if (existingUpdateInterval != -1) { |         if (existingUpdateInterval != -1) { | ||||||
|   | |||||||
							
								
								
									
										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