build: (deps): bump matrix from 6.2.0 to 7.0.0
Bumps [matrix](https://github.com/famedly/matrix-dart-sdk) from 6.2.0 to 7.0.0. - [Release notes](https://github.com/famedly/matrix-dart-sdk/releases) - [Changelog](https://github.com/famedly/matrix-dart-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/famedly/matrix-dart-sdk/compare/v6.2.0...v7.0.0) --- updated-dependencies: - dependency-name: matrix dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
27125f8762
commit
7b2bffc195
8 changed files with 35 additions and 30 deletions
|
|
@ -44,7 +44,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||
),
|
||||
builder: (context, snapshot) {
|
||||
var members = room.getParticipants().toList()
|
||||
..sort((b, a) => a.powerLevel.compareTo(b.powerLevel));
|
||||
..sort((b, a) => a.powerLevel.level.compareTo(b.powerLevel.level));
|
||||
members = members.take(10).toList();
|
||||
final actualMembersCount =
|
||||
(room.summary.mInvitedMemberCount ?? 0) +
|
||||
|
|
|
|||
|
|
@ -23,13 +23,16 @@ class ParticipantListItem extends StatelessWidget {
|
|||
Membership.leave => L10n.of(context).leftTheChat,
|
||||
};
|
||||
|
||||
final permissionBatch = user.room.creatorUserIds.contains(user.id)
|
||||
? L10n.of(context).owner
|
||||
: user.powerLevel >= 100
|
||||
? L10n.of(context).admin
|
||||
: user.powerLevel >= 50
|
||||
? L10n.of(context).moderator
|
||||
: '';
|
||||
final permissionBatch = switch (user.powerLevel.role) {
|
||||
PowerLevelRole.user => '',
|
||||
PowerLevelRole.moderator => L10n.of(context).moderator,
|
||||
PowerLevelRole.admin => L10n.of(context).admin,
|
||||
PowerLevelRole.owner => L10n.of(context).owner,
|
||||
};
|
||||
|
||||
final isAdminOrOwner =
|
||||
user.powerLevel.role == PowerLevelRole.admin ||
|
||||
user.powerLevel.role == PowerLevelRole.owner;
|
||||
|
||||
return ListTile(
|
||||
onTap: () => showMemberActionsPopupMenu(context: context, user: user),
|
||||
|
|
@ -45,7 +48,7 @@ class ParticipantListItem extends StatelessWidget {
|
|||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: user.powerLevel >= 100
|
||||
color: isAdminOrOwner
|
||||
? theme.colorScheme.tertiary
|
||||
: theme.colorScheme.tertiaryContainer,
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
|
|
@ -53,7 +56,7 @@ class ParticipantListItem extends StatelessWidget {
|
|||
child: Text(
|
||||
permissionBatch,
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: user.powerLevel >= 100
|
||||
color: isAdminOrOwner
|
||||
? theme.colorScheme.onTertiary
|
||||
: theme.colorScheme.onTertiaryContainer,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue