Compare commits

...

6 Commits

Author SHA1 Message Date
Imran
b63a798d86 Merge pull request #1180 from ImranR98/dev
- Fix installed version bug when importing apps (#1179)
- Share button now shares Obtainium "protocol" links
2023-12-22 20:14:07 -06:00
Imran Remtulla
eacf3777a4 Update packages, increment version 2023-12-22 21:13:15 -05:00
Imran Remtulla
a5a7436bb1 Share button now shares Obtainium "protocol" links 2023-12-22 21:12:07 -05:00
Imran Remtulla
2a4cc35df7 Fix installed version bug when importing apps (#1179) 2023-12-22 21:10:11 -05:00
Imran Remtulla
cdccf58b76 Merge remote-tracking branch 'origin/dev' 2023-12-22 21:00:09 -05:00
Imran Remtulla
27300383a1 Add Wiki link 2023-12-22 20:59:49 -05:00
5 changed files with 19 additions and 27 deletions

View File

@@ -6,6 +6,8 @@ Obtainium allows you to install and update Apps directly from their releases pag
Motivation: [Side Of Burritos - You should use this instead of F-Droid | How to use app RSS feed](https://youtu.be/FFz57zNR_M0) Motivation: [Side Of Burritos - You should use this instead of F-Droid | How to use app RSS feed](https://youtu.be/FFz57zNR_M0)
Wiki: [https://github.com/ImranR98/Obtainium/wiki](https://github.com/ImranR98/Obtainium/wiki)
Currently supported App sources: Currently supported App sources:
- Open Source - General: - Open Source - General:
- [GitHub](https://github.com/) - [GitHub](https://github.com/)

View File

@@ -19,7 +19,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
// ignore: implementation_imports // ignore: implementation_imports
import 'package:easy_localization/src/localization.dart'; import 'package:easy_localization/src/localization.dart';
const String currentVersion = '0.14.39'; const String currentVersion = '0.14.40';
const String currentReleaseTag = const String currentReleaseTag =
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES 'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES

View File

@@ -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))
]) ])
] ]
], ],

View File

@@ -740,12 +740,15 @@ class AppsProvider with ChangeNotifier {
return appsDir; return appsDir;
} }
Future<PackageInfo?> getInstalledInfo(String? packageName) async { Future<PackageInfo?> getInstalledInfo(String? packageName,
{bool printErr = true}) async {
if (packageName != null) { if (packageName != null) {
try { try {
return await pm.getPackageInfo(packageName: packageName); return await pm.getPackageInfo(packageName: packageName);
} catch (e) { } catch (e) {
print(e); // OK if (printErr) {
print(e); // OK
}
} }
} }
return null; return null;
@@ -1253,9 +1256,8 @@ class AppsProvider with ChangeNotifier {
await Future.delayed(const Duration(microseconds: 1)); await Future.delayed(const Duration(microseconds: 1));
} }
for (App a in importedApps) { for (App a in importedApps) {
if (apps[a.id]?.app.installedVersion != null) { a.installedVersion =
a.installedVersion = apps[a.id]?.app.installedVersion; (await getInstalledInfo(a.id, printErr: false))?.versionName;
}
} }
await saveApps(importedApps, onlyIfExists: false); await saveApps(importedApps, onlyIfExists: false);
notifyListeners(); notifyListeners();

View File

@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 0.14.39+233 # When changing this, update the tag in main() accordingly version: 0.14.40+234 # When changing this, update the tag in main() accordingly
environment: environment:
sdk: '>=3.0.0 <4.0.0' sdk: '>=3.0.0 <4.0.0'