Skip to content

Commit

Permalink
Merge pull request #389 from pangeachat/unenable-my-analytics
Browse files Browse the repository at this point in the history
Better filter for my analytics button
  • Loading branch information
ggurdin authored Jun 25, 2024
2 parents 1b69e1a + 710a85f commit fffa902
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pages/chat_list/client_chooser_button.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:fluffychat/pangea/constants/class_default_values.dart';
import 'package:fluffychat/pangea/extensions/pangea_room_extension/pangea_room_extension.dart';
import 'package:fluffychat/pangea/utils/find_conversation_partner_dialog.dart';
import 'package:fluffychat/pangea/utils/logout.dart';
import 'package:fluffychat/pangea/utils/space_code.dart';
Expand Down Expand Up @@ -68,7 +69,9 @@ class ClientChooserButton extends StatelessWidget {
),
),
PopupMenuItem(
enabled: matrix.client.rooms.isNotEmpty,
enabled: matrix.client.rooms.any(
(room) => !room.isSpace && !room.isArchived && !room.isAnalyticsRoom,
),
value: SettingsAction.myAnalytics,
child: Row(
children: [
Expand Down

0 comments on commit fffa902

Please sign in to comment.