Skip to content

Commit 84315e4

Browse files
committed
feat: Lock build mixes
1 parent 7c6141e commit 84315e4

File tree

6 files changed

+8
-1
lines changed

6 files changed

+8
-1
lines changed

lib/screens/collection/collection_item.dart

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class _CollectionItemState extends State<CollectionItem> {
7474
widget.collectionType,
7575
widget.collection.id,
7676
widget.refreshList,
77+
widget.collection.readonly,
7778
);
7879
},
7980
child: FlipTile(

lib/utils/navigation/escape_action.dart

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class EscapeAction extends Action<DismissIntent> {
88

99
@override
1010
void invoke(covariant DismissIntent intent) {
11-
print('INVOKING');
1211
if (escapeFromSearch()) return;
1312
if (escapeFromCoverArtWall()) return;
1413
}

lib/widgets/start_screen/utils/internal_collection.dart

+3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ class InternalCollection {
77
final QueryList queries;
88
final CollectionType collectionType;
99
final Map<int, String> coverArtMap;
10+
final bool readonly;
1011

1112
InternalCollection({
1213
required this.id,
1314
required this.name,
1415
required this.queries,
1516
required this.collectionType,
1617
required this.coverArtMap,
18+
required this.readonly,
1719
});
1820

1921
static InternalCollection fromRawCollection(Collection x) {
@@ -23,6 +25,7 @@ class InternalCollection {
2325
queries: QueryList.fromMixQuery(x.queries),
2426
collectionType: x.collectionType,
2527
coverArtMap: x.coverArtMap,
28+
readonly: x.readonly,
2629
);
2730
}
2831
}

messages/collection.proto

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ message Collection {
4040
repeated mix.MixQuery queries = 3;
4141
CollectionType collection_type = 4;
4242
map<int32, string> cover_art_map = 5;
43+
bool readonly = 6;
4344
}
4445

4546
message CollectionGroup {

native/hub/src/collection.rs

+2
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ impl Collection {
440440
}],
441441
collection_type,
442442
cover_art_map: HashMap::new(),
443+
readonly: false,
443444
}
444445
}
445446

@@ -467,6 +468,7 @@ impl Collection {
467468
queries: queries.to_vec(),
468469
collection_type: 3,
469470
cover_art_map: HashMap::new(),
471+
readonly: mix.locked,
470472
}
471473
}
472474

native/hub/src/utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub async fn inject_cover_art_map(
3030
queries: collection.queries,
3131
collection_type: collection.collection_type,
3232
cover_art_map,
33+
readonly: collection.readonly,
3334
})
3435
}
3536

0 commit comments

Comments
 (0)