Skip to content

Commit

Permalink
feat: Lock build mixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Losses committed Nov 5, 2024
1 parent 7c6141e commit 84315e4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/screens/collection/collection_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class _CollectionItemState extends State<CollectionItem> {
widget.collectionType,
widget.collection.id,
widget.refreshList,
widget.collection.readonly,
);
},
child: FlipTile(
Expand Down
1 change: 0 additions & 1 deletion lib/utils/navigation/escape_action.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class EscapeAction extends Action<DismissIntent> {

@override
void invoke(covariant DismissIntent intent) {
print('INVOKING');
if (escapeFromSearch()) return;
if (escapeFromCoverArtWall()) return;
}
Expand Down
3 changes: 3 additions & 0 deletions lib/widgets/start_screen/utils/internal_collection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ class InternalCollection {
final QueryList queries;
final CollectionType collectionType;
final Map<int, String> coverArtMap;
final bool readonly;

InternalCollection({
required this.id,
required this.name,
required this.queries,
required this.collectionType,
required this.coverArtMap,
required this.readonly,
});

static InternalCollection fromRawCollection(Collection x) {
Expand All @@ -23,6 +25,7 @@ class InternalCollection {
queries: QueryList.fromMixQuery(x.queries),
collectionType: x.collectionType,
coverArtMap: x.coverArtMap,
readonly: x.readonly,
);
}
}
1 change: 1 addition & 0 deletions messages/collection.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ message Collection {
repeated mix.MixQuery queries = 3;
CollectionType collection_type = 4;
map<int32, string> cover_art_map = 5;
bool readonly = 6;
}

message CollectionGroup {
Expand Down
2 changes: 2 additions & 0 deletions native/hub/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ impl Collection {
}],
collection_type,
cover_art_map: HashMap::new(),
readonly: false,
}
}

Expand Down Expand Up @@ -467,6 +468,7 @@ impl Collection {
queries: queries.to_vec(),
collection_type: 3,
cover_art_map: HashMap::new(),
readonly: mix.locked,
}
}

Expand Down
1 change: 1 addition & 0 deletions native/hub/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub async fn inject_cover_art_map(
queries: collection.queries,
collection_type: collection.collection_type,
cover_art_map,
readonly: collection.readonly,
})
}

Expand Down

0 comments on commit 84315e4

Please sign in to comment.