mirror of
https://github.com/BlueBubblesApp/bluebubbles-app.git
synced 2025-08-06 19:44:08 +08:00
Fix convo bubbles not working and getting intent when closed not working
This commit is contained in:
@ -40,7 +40,11 @@ class CupertinoHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||
if (ss.settings.showConnectionIndicator.value)
|
||||
const ConnectionIndicator(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 20.0, right: 20, top: kIsDesktop ? 0 : MediaQuery.of(context).viewPadding.top - 2),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.0,
|
||||
right: 20,
|
||||
top: kIsDesktop ? 0 : (MediaQuery.of(context).viewPadding.top - 2).clamp(0, double.infinity)
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
|
@ -52,6 +52,7 @@ late final Box<ThemeStruct> themeBox;
|
||||
late final Box<ThemeEntry> themeEntryBox;
|
||||
late final Box<ThemeObject> themeObjectBox;
|
||||
final Completer<void> storeStartup = Completer();
|
||||
final Completer<void> uiStartup = Completer();
|
||||
|
||||
@pragma('vm:entry-point')
|
||||
//ignore: prefer_void_to_null
|
||||
@ -69,7 +70,7 @@ Future<Null> bubble() async {
|
||||
Future<Null> initApp(bool bubble) async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
/* ----- SERVICES INITIALIZATION ----- */
|
||||
ls.isBubble = false;
|
||||
ls.isBubble = bubble;
|
||||
ls.isUiThread = true;
|
||||
await ss.init();
|
||||
await fs.init();
|
||||
@ -521,6 +522,7 @@ class _HomeState extends OptimizedState<Home> with WidgetsBindingObserver {
|
||||
});
|
||||
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
uiStartup.complete();
|
||||
/* ----- SERVER VERSION CHECK ----- */
|
||||
if (kIsWeb && ss.settings.finishedSetup.value) {
|
||||
int version = (await ss.getServerDetails()).item4;
|
||||
|
@ -587,7 +587,7 @@ class Chat {
|
||||
save(updateHasUnreadMessage: true);
|
||||
|
||||
try {
|
||||
if (clearLocalNotifications && !hasUnread) {
|
||||
if (clearLocalNotifications && !hasUnread && !ls.isBubble) {
|
||||
mcs.invokeMethod("clear-chat-notifs", {"chatGuid": guid});
|
||||
}
|
||||
if (privateMark && ss.settings.enablePrivateAPI.value && ss.settings.privateMarkChatAsRead.value) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:bluebubbles/main.dart';
|
||||
import 'package:bluebubbles/utils/logger.dart';
|
||||
import 'package:bluebubbles/helpers/helpers.dart';
|
||||
import 'package:bluebubbles/app/layouts/chat_creator/chat_creator.dart';
|
||||
@ -83,6 +84,7 @@ class IntentsService extends GetxService {
|
||||
|
||||
Future<void> openChat(String? guid, {String? text, List<PlatformFile> attachments = const []}) async {
|
||||
if (guid == null) {
|
||||
await uiStartup.future;
|
||||
ns.pushAndRemoveUntil(
|
||||
Get.context!,
|
||||
ChatCreator(
|
||||
@ -128,6 +130,7 @@ class IntentsService extends GetxService {
|
||||
}
|
||||
|
||||
if (!chatIsOpen) {
|
||||
await uiStartup.future;
|
||||
ns.pushAndRemoveUntil(
|
||||
Get.context!,
|
||||
ConversationView(
|
||||
|
Reference in New Issue
Block a user