mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 13:05:37 +02:00
Revert "fix: save patched and installed apps on prefs, improve installer log, improve dashboard with real data (wip)"
This reverts commit ce09a5264a
.
This commit is contained in:
parent
ce09a5264a
commit
cd1610d847
19 changed files with 365 additions and 180 deletions
|
@ -1,43 +1,21 @@
|
|||
import 'dart:typed_data';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:revanced_manager/models/patch.dart';
|
||||
|
||||
part 'patched_application.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class PatchedApplication {
|
||||
final String name;
|
||||
final String packageName;
|
||||
final String version;
|
||||
final String apkFilePath;
|
||||
@JsonKey(
|
||||
fromJson: bytesFromString,
|
||||
toJson: bytesToString,
|
||||
)
|
||||
final Uint8List icon;
|
||||
final DateTime patchDate;
|
||||
final bool isRooted;
|
||||
final bool isFromStorage;
|
||||
final List<String> appliedPatches;
|
||||
final List<Patch> appliedPatches;
|
||||
|
||||
PatchedApplication({
|
||||
required this.name,
|
||||
required this.packageName,
|
||||
required this.version,
|
||||
required this.apkFilePath,
|
||||
required this.icon,
|
||||
required this.patchDate,
|
||||
required this.isRooted,
|
||||
required this.isFromStorage,
|
||||
this.appliedPatches = const <String>[],
|
||||
this.appliedPatches = const <Patch>[],
|
||||
});
|
||||
|
||||
factory PatchedApplication.fromJson(Map<String, dynamic> json) =>
|
||||
_$PatchedApplicationFromJson(json);
|
||||
|
||||
Map toJson() => _$PatchedApplicationToJson(this);
|
||||
|
||||
static Uint8List bytesFromString(String pictureUrl) =>
|
||||
Uint8List.fromList(pictureUrl.codeUnits);
|
||||
|
||||
static String bytesToString(Uint8List bytes) => String.fromCharCodes(bytes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue