Merge album_UI_revamp after resolving merge conflicts

This commit is contained in:
ashilkn
2025-05-16 16:19:45 +05:30
4 changed files with 16 additions and 13 deletions

View File

@@ -653,13 +653,21 @@ class PreviewVideoStore {
int? parseDurationFromHLS(String playlist) {
final lines = playlist.split("\n");
double totalDuration = 0.0;
for (final line in lines) {
if (line.startsWith("#EXT-X-TARGETDURATION")) {
final duration = line.split(":").last.trim();
return int.tryParse(duration);
if (line.startsWith("#EXTINF:")) {
// Extract duration value (e.g., "#EXTINF:2.400000," → "2.400000")
final durationStr = line.substring(
8,
line.length - 1,
);
final duration = double.tryParse(durationStr);
if (duration != null) {
totalDuration += duration;
}
}
}
return null;
return totalDuration > 0 ? totalDuration.round() : null;
}
Future<(String, String)> _getPreviewUrl(EnteFile file) async {

View File

@@ -55,7 +55,7 @@ class _AlbumParticipantsPageState extends State<AlbumParticipantsPage> {
await routeToPage(
context,
AddParticipantPage(
widget.collection as List<Collection>,
[widget.collection],
addingViewer
? [ActionTypesToShow.addViewer]
: [ActionTypesToShow.addCollaborator],

View File

@@ -201,10 +201,8 @@ class _AlbumSelectionActionWidgetState
context,
nonEmptyCollection,
);
if (result == true) {
Navigator.of(context).pop();
} else {
debugPrint("No pop");
if (result == false) {
debugPrint("Failed to delete collection");
}
}
if (hasFavorites) {
@@ -327,9 +325,6 @@ class _AlbumSelectionActionWidgetState
labelText: S.of(context).leaveAlbum,
onTap: () async {
for (final collection in widget.selectedAlbums.albums) {
if (collection.type == CollectionType.favorites) {
continue;
}
await CollectionsService.instance.leaveAlbum(collection);
}
widget.selectedAlbums.clearAll();

View File

@@ -12,7 +12,7 @@ description: ente photos application
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.14+1044
version: 1.0.14+1045
publish_to: none
environment: