Merge pull request 'Fix listen provider bug' (#99) from quote into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #99
Reviewed-by: Dan Ballard <dan@openprivacy.ca>
This commit is contained in:
Dan Ballard 2021-07-07 12:48:11 -07:00
commit c51fd10650
1 changed files with 4 additions and 3 deletions

View File

@ -107,10 +107,11 @@ class _MessageViewState extends State<MessageView> {
void _sendMessage([String? ignoredParam]) {
if (ctrlrCompose.value.text.isNotEmpty) {
if (Provider.of<AppState>(context).selectedConversation != null && Provider.of<AppState>(context).selectedIndex != null) {
Provider.of<FlwtchState>(context)
if (Provider.of<AppState>(context, listen: false).selectedConversation != null && Provider.of<AppState>(context, listen: false).selectedIndex != null) {
Provider.of<FlwtchState>(context, listen: false)
.cwtch
.GetMessage(Provider.of<AppState>(context).selectedProfile!, Provider.of<AppState>(context).selectedConversation!, Provider.of<AppState>(context).selectedIndex!)
.GetMessage(Provider.of<AppState>(context, listen: false).selectedProfile!, Provider.of<AppState>(context, listen: false).selectedConversation!,
Provider.of<AppState>(context, listen: false).selectedIndex!)
.then((data) {
try {
var messageWrapper = jsonDecode(data! as String);