feat: add devtools extensions and fix poll dialog UI/UX
- Enabled `provider` and `shared_preferences` extensions in `devtools_options.yaml`. - Added logging for message object data on chat bubble tap. - Fixed layout issues in poll dialog by wrapping `LoadingSpinner` in a `Column` and changing `ListView` to a `Column` in `pollOptionsList.dart`. - Updated poll submission button to wait for the poll state to load before allowing interaction.
This commit is contained in:
@@ -311,7 +311,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
|
||||
content: FutureBuilder(
|
||||
future: pollState,
|
||||
builder: (context, snapshot) {
|
||||
if(snapshot.connectionState == ConnectionState.waiting) return const LoadingSpinner();
|
||||
if(snapshot.connectionState == ConnectionState.waiting) return const Column(mainAxisSize: MainAxisSize.min, children: [LoadingSpinner()]);
|
||||
|
||||
var pollData = snapshot.data!.data;
|
||||
ownVotes = pollData.votedSelf;
|
||||
@@ -322,14 +322,15 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
|
||||
}
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop();
|
||||
if(ownVotes == null) return;
|
||||
VotePoll(pollId: pollId, token: widget.bubbleData.token, params: VotePollParams(optionIds: ownVotes!)).run();
|
||||
},
|
||||
child: const Text('Stimme abgeben')
|
||||
),
|
||||
FutureBuilder(future: pollState, builder: (context, snapshot) => TextButton(
|
||||
onPressed: () async {
|
||||
if(snapshot.connectionState != ConnectionState.done) return;
|
||||
Navigator.of(context).pop();
|
||||
if(ownVotes == null) return;
|
||||
VotePoll(pollId: pollId, token: widget.bubbleData.token, params: VotePollParams(optionIds: ownVotes!)).run();
|
||||
},
|
||||
child: const Text('Stimme abgeben')
|
||||
)),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('Abbrechen')
|
||||
|
||||
Reference in New Issue
Block a user