chore: don't allow hover of non-selectable activity participants items (#4002)

pull/2245/head
ggurdin 1 month ago committed by GitHub
parent 52c44080d9
commit 414d28f78d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -16,6 +16,7 @@ class ActivityParticipantIndicator extends StatelessWidget {
final VoidCallback? onTap;
final bool selected;
final bool selectable;
final double opacity;
final EdgeInsetsGeometry? padding;
@ -27,6 +28,7 @@ class ActivityParticipantIndicator extends StatelessWidget {
this.user,
this.userId,
this.selected = false,
this.selectable = true,
this.onTap,
this.opacity = 1.0,
this.padding,
@ -58,7 +60,7 @@ class ActivityParticipantIndicator extends StatelessWidget {
),
decoration: BoxDecoration(
borderRadius: borderRadius ?? BorderRadius.circular(8.0),
color: hovered || selected
color: (hovered || selected) && selectable
? theme.colorScheme.surfaceContainerHighest
: Colors.transparent,
),

@ -85,6 +85,7 @@ class ActivityParticipantList extends StatelessWidget {
? () => onTap!(availableRole.id)
: null,
selected: selected,
selectable: selectable,
);
}).toList(),
),

@ -43,6 +43,7 @@ class CourseActivityRepo {
final activities = <ActivityPlanModel>[];
final toFetch = <String>[];
await _storage.initStorage;
for (final uuid in uuids) {
final cached = _getCached(uuid);
if (cached != null) {

@ -47,6 +47,7 @@ class CourseLocationRepo {
final locations = <CourseLocationModel>[];
final toFetch = <String>[];
await _storage.initStorage;
for (final uuid in uuids) {
final cached = _getCached(uuid);
if (cached != null) {

@ -27,6 +27,7 @@ class CourseMediaRepo {
final urls = <String>[];
final toFetch = <String>[];
await _storage.initStorage;
for (final uuid in uuids) {
final cached = _getCached(uuid);
if (cached != null) {

@ -94,6 +94,7 @@ class CoursePlansRepo {
}
static Future<CoursePlanModel> get(String id) async {
await _courseStorage.initStorage;
final cached = _getCached(id);
if (cached != null) {
return cached;
@ -131,6 +132,7 @@ class CoursePlansRepo {
}
static Future<List<CoursePlanModel>> search({CourseFilter? filter}) async {
await _courseStorage.initStorage;
final cached = _getCachedSearchResults(filter ?? CourseFilter());
if (cached != null && cached.isNotEmpty) {
return cached;

@ -32,6 +32,7 @@ class CourseTopicRepo {
final topics = <CourseTopicModel>[];
final toFetch = <String>[];
await _storage.initStorage;
for (final uuid in uuids) {
final cached = _getCached(uuid);
if (cached != null) {

Loading…
Cancel
Save