mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-28 12:03:45 +01:00 
			
		
		
		
	Share button now shares Obtainium "protocol" links
This commit is contained in:
		| @@ -496,14 +496,8 @@ class AppsPageState extends State<AppsPage> { | |||||||
|       var transparent = |       var transparent = | ||||||
|           Theme.of(context).colorScheme.background.withAlpha(0).value; |           Theme.of(context).colorScheme.background.withAlpha(0).value; | ||||||
|       List<double> stops = [ |       List<double> stops = [ | ||||||
|         ...listedApps[index] |         ...listedApps[index].app.categories.asMap().entries.map( | ||||||
|             .app |             (e) => ((e.key / (listedApps[index].app.categories.length - 1)))), | ||||||
|             .categories |  | ||||||
|             .asMap() |  | ||||||
|             .entries |  | ||||||
|             .map((e) => |  | ||||||
|                 ((e.key / (listedApps[index].app.categories.length - 1)))) |  | ||||||
|             , |  | ||||||
|         1 |         1 | ||||||
|       ]; |       ]; | ||||||
|       if (stops.length == 2) { |       if (stops.length == 2) { | ||||||
| @@ -516,13 +510,9 @@ class AppsPageState extends State<AppsPage> { | |||||||
|                   begin: const Alignment(-1, 0), |                   begin: const Alignment(-1, 0), | ||||||
|                   end: const Alignment(-0.97, 0), |                   end: const Alignment(-0.97, 0), | ||||||
|                   colors: [ |                   colors: [ | ||||||
|                 ...listedApps[index] |                 ...listedApps[index].app.categories.map((e) => | ||||||
|                     .app |                     Color(settingsProvider.categories[e] ?? transparent) | ||||||
|                     .categories |                         .withAlpha(255)), | ||||||
|                     .map((e) => |  | ||||||
|                         Color(settingsProvider.categories[e] ?? transparent) |  | ||||||
|                             .withAlpha(255)) |  | ||||||
|                     , |  | ||||||
|                 Color(transparent) |                 Color(transparent) | ||||||
|               ])), |               ])), | ||||||
|           child: ListTile( |           child: ListTile( | ||||||
| @@ -881,7 +871,7 @@ class AppsPageState extends State<AppsPage> { | |||||||
|                         onPressed: () { |                         onPressed: () { | ||||||
|                           String urls = ''; |                           String urls = ''; | ||||||
|                           for (var a in selectedApps) { |                           for (var a in selectedApps) { | ||||||
|                             urls += '${a.url}\n'; |                             urls += 'obtainium://add/${a.url}\n'; | ||||||
|                           } |                           } | ||||||
|                           urls = urls.substring(0, urls.length - 1); |                           urls = urls.substring(0, urls.length - 1); | ||||||
|                           Share.share(urls, |                           Share.share(urls, | ||||||
| @@ -981,10 +971,8 @@ class AppsPageState extends State<AppsPage> { | |||||||
|                       defaultValue: filter.sourceFilter, |                       defaultValue: filter.sourceFilter, | ||||||
|                       [ |                       [ | ||||||
|                         MapEntry('', tr('none')), |                         MapEntry('', tr('none')), | ||||||
|                         ...sourceProvider.sources |                         ...sourceProvider.sources.map( | ||||||
|                             .map((e) => |                             (e) => MapEntry(e.runtimeType.toString(), e.name)) | ||||||
|                                 MapEntry(e.runtimeType.toString(), e.name)) |  | ||||||
|                              |  | ||||||
|                       ]) |                       ]) | ||||||
|                 ] |                 ] | ||||||
|               ], |               ], | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user