Fix Scribe mobile inline never showing modal
- The context.mounted check was placed after onTapFallback?.call() - The onTapFallback function calls controller.saveAndUnfocusForModal() which unfocuses the editor - This caused the context to become unmounted so the context.mounted check would return early - As a result the modal would never be show
This commit is contained in:
@@ -43,12 +43,10 @@ class InlineAiAssistButton extends StatelessWidget {
|
|||||||
size = renderBox.size;
|
size = renderBox.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
await onTapFallback?.call();
|
|
||||||
|
|
||||||
if (!context.mounted) return;
|
|
||||||
|
|
||||||
final isScribeMobile = AiScribeMobileUtils.isScribeInMobileMode(context);
|
final isScribeMobile = AiScribeMobileUtils.isScribeInMobileMode(context);
|
||||||
|
|
||||||
|
await onTapFallback?.call();
|
||||||
|
|
||||||
await AiScribeModalManager.showAIScribeModal(
|
await AiScribeModalManager.showAIScribeModal(
|
||||||
isScribeMobile: isScribeMobile,
|
isScribeMobile: isScribeMobile,
|
||||||
imagePaths: imagePaths,
|
imagePaths: imagePaths,
|
||||||
|
|||||||
Reference in New Issue
Block a user