chore: Hide topic if empty and cannot be changed
This commit is contained in:
parent
adc17d63aa
commit
0a23dca11e
1 changed files with 46 additions and 42 deletions
|
|
@ -207,6 +207,8 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
if (room.canChangeStateEvent(EventTypes.RoomTopic) ||
|
||||||
|
room.topic.isNotEmpty) ...[
|
||||||
Divider(color: theme.dividerColor),
|
Divider(color: theme.dividerColor),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
|
|
@ -216,11 +218,12 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
trailing: room
|
trailing:
|
||||||
.canChangeStateEvent(EventTypes.RoomTopic)
|
room.canChangeStateEvent(EventTypes.RoomTopic)
|
||||||
? IconButton(
|
? IconButton(
|
||||||
onPressed: controller.setTopicAction,
|
onPressed: controller.setTopicAction,
|
||||||
tooltip: L10n.of(context).setChatDescription,
|
tooltip:
|
||||||
|
L10n.of(context).setChatDescription,
|
||||||
icon: const Icon(Icons.edit_outlined),
|
icon: const Icon(Icons.edit_outlined),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
|
|
@ -254,6 +257,7 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
],
|
||||||
Divider(color: theme.dividerColor),
|
Divider(color: theme.dividerColor),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue