Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: bump version 0.6.7 (#5949)

Lucas.Xuf1ad03eaa94c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f94103605..8bab3da249 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,15 @@
# Release Notes
+## Version 0.6.7 - 13/08/2024
+### New Features
+- Redesigned the icon picker design on Desktop.
+- Redesigned the notification page on Mobile.
+
+### Bug Fixes
+- Enhance the toolbar tooltip functionality on Desktop.
+- Enhance the slash menu user experience on Desktop.
+- Fixed the issue where list style overrides occurred during text pasting.
+- Fixed the issue where linking multiple databases in the same document could cause random loss of focus.
+
## Version 0.6.6 - 30/07/2024
### New Features
- Upgrade your workspace to a premium plan to unlock more features and storage.
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/mobile_bottom_navigation_bar.dart b/frontend/appflowy_flutter/lib/mobile/presentation/mobile_bottom_navigation_bar.dart
index 5253022d40..1e1cd88ad9 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/mobile_bottom_navigation_bar.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/mobile_bottom_navigation_bar.dart
@@ -4,6 +4,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/notifications/mobile_notifications_screen.dart';
import 'package:appflowy/mobile/presentation/widgets/navigation_bar_button.dart';
+import 'package:appflowy/shared/red_dot.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/reminder/reminder_bloc.dart';
import 'package:appflowy/util/theme_extension.dart';
@@ -162,7 +163,7 @@ class _NotificationNavigationBarItemIcon extends StatelessWidget {
const Positioned(
top: 2,
right: 4,
- child: _RedDot(),
+ child: NotificationRedDot(),
),
],
);
@@ -172,25 +173,6 @@ class _NotificationNavigationBarItemIcon extends StatelessWidget {
}
}
-class _RedDot extends StatelessWidget {
- const _RedDot();
-
- @override
- Widget build(BuildContext context) {
- return Container(
- width: 6,
- height: 6,
- clipBehavior: Clip.antiAlias,
- decoration: ShapeDecoration(
- color: const Color(0xFFFF2214),
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(20),
- ),
- ),
- );
- }
-}
-
class _HomePageNavigationBar extends StatelessWidget {
const _HomePageNavigationBar({
required this.navigationShell,
@@ -230,11 +212,13 @@ class _HomePageNavigationBar extends StatelessWidget {
/// Navigate to the current location of the branch at the provided index when
/// tapping an item in the BottomNavigationBar.
void _onTap(BuildContext context, int bottomBarIndex) {
- if (_items[bottomBarIndex].label == _addLabel) {
+ final label = _items[bottomBarIndex].label;
+ if (label == _addLabel) {
// show an add dialog
mobileCreateNewPageNotifier.value = ViewLayoutPB.Document;
-
return;
+ } else if (label == _notificationLabel) {
+ getIt<ReminderBloc>().add(const ReminderEvent.refresh());
}
// When navigating to a new branch, it's recommended to use the goBranch
// method, as doing so makes sure the last navigation state of the
diff --git a/frontend/appflowy_flutter/lib/shared/red_dot.dart b/frontend/appflowy_flutter/lib/shared/red_dot.dart
new file mode 100644
index 0000000000..149cadae04
--- /dev/null
+++ b/frontend/appflowy_flutter/lib/shared/red_dot.dart
@@ -0,0 +1,25 @@
+import 'package:flutter/widgets.dart';
+
+class NotificationRedDot extends StatelessWidget {
+ const NotificationRedDot({
+ super.key,
+ this.size = 6,
+ });
+
+ final double size;
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ width: size,
+ height: size,
+ clipBehavior: Clip.antiAlias,
+ decoration: ShapeDecoration(
+ color: const Color(0xFFFF2214),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(20),
+ ),
+ ),
+ );
+ }
+}
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/notifications/widgets/notification_button.dart b/frontend/appflowy_flutter/lib/workspace/presentation/notifications/widgets/notification_button.dart
index 433511929f..e0747fc684 100644
--- a/frontend/appflowy_flutter/lib/workspace/presentation/notifications/widgets/notification_button.dart
+++ b/frontend/appflowy_flutter/lib/workspace/presentation/notifications/widgets/notification_button.dart
@@ -1,5 +1,6 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
+import 'package:appflowy/shared/red_dot.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/reminder/reminder_bloc.dart';
import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart';
@@ -7,7 +8,6 @@ import 'package:appflowy/workspace/application/settings/notifications/notificati
import 'package:appflowy/workspace/presentation/notifications/notification_dialog.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart';
-import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -43,33 +43,35 @@ class _NotificationButtonState extends State<NotificationButton> {
child: BlocBuilder<NotificationSettingsCubit, NotificationSettingsState>(
builder: (notificationSettingsContext, notificationSettingsState) {
return BlocBuilder<ReminderBloc, ReminderState>(
- builder: (context, state) => notificationSettingsState
- .isShowNotificationsIconEnabled
- ? FlowyTooltip(
- message: LocaleKeys.notificationHub_title.tr(),
- child: AppFlowyPopover(
- mutex: mutex,
- direction: PopoverDirection.bottomWithLeftAligned,
- constraints:
- const BoxConstraints(maxHeight: 500, maxWidth: 425),
- windowPadding: EdgeInsets.zero,
- margin: EdgeInsets.zero,
- popupBuilder: (_) =>
- NotificationDialog(views: views, mutex: mutex),
- child: SizedBox.square(
- dimension: 24.0,
- child: FlowyButton(
- useIntrinsicWidth: true,
- margin: EdgeInsets.zero,
- text: _buildNotificationIcon(
- context,
- state.hasUnreads,
+ builder: (context, state) {
+ final hasUnreads = state.reminders.any((r) => !r.isRead);
+ return notificationSettingsState.isShowNotificationsIconEnabled
+ ? FlowyTooltip(
+ message: LocaleKeys.notificationHub_title.tr(),
+ child: AppFlowyPopover(
+ mutex: mutex,
+ direction: PopoverDirection.bottomWithLeftAligned,
+ constraints:
+ const BoxConstraints(maxHeight: 500, maxWidth: 425),
+ windowPadding: EdgeInsets.zero,
+ margin: EdgeInsets.zero,
+ popupBuilder: (_) =>
+ NotificationDialog(views: views, mutex: mutex),
+ child: SizedBox.square(
+ dimension: 24.0,
+ child: FlowyButton(
+ useIntrinsicWidth: true,
+ margin: EdgeInsets.zero,
+ text: _buildNotificationIcon(
+ context,
+ hasUnreads,
+ ),
),
),
),
- ),
- )
- : const SizedBox.shrink(),
+ )
+ : const SizedBox.shrink();
+ },
);
},
),
@@ -86,15 +88,11 @@ class _NotificationButtonState extends State<NotificationButton> {
),
),
if (hasUnreads)
- Positioned(
- bottom: 2,
- right: 2,
- child: DecoratedBox(
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: AFThemeExtension.of(context).warning,
- ),
- child: const SizedBox(height: 8, width: 8),
+ const Positioned(
+ top: 4,
+ right: 6,
+ child: NotificationRedDot(
+ size: 5,
),
),
],
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock
index 5232879284..64cc436a15 100644
--- a/frontend/appflowy_tauri/src-tauri/Cargo.lock
+++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock
@@ -962,7 +962,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-trait",
@@ -986,7 +986,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-trait",
@@ -1016,7 +1016,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"collab",
@@ -1036,7 +1036,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"bytes",
@@ -1055,7 +1055,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"chrono",
@@ -1093,7 +1093,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-stream",
@@ -1174,7 +1174,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"collab",
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml
index e1ea6f63ba..25aab8120f 100644
--- a/frontend/appflowy_tauri/src-tauri/Cargo.toml
+++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml
@@ -116,13 +116,13 @@ custom-protocol = ["tauri/custom-protocol"]
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
# Working directory: frontend
# To update the commit ID, run:
diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock
index d09880059e..7af7287706 100644
--- a/frontend/appflowy_web_app/src-tauri/Cargo.lock
+++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock
@@ -945,7 +945,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-trait",
@@ -969,7 +969,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-trait",
@@ -999,7 +999,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"collab",
@@ -1019,7 +1019,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"bytes",
@@ -1038,7 +1038,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"chrono",
@@ -1076,7 +1076,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-stream",
@@ -1157,7 +1157,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"collab",
diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml
index b4db66e726..5d5dc9ec3a 100644
--- a/frontend/appflowy_web_app/src-tauri/Cargo.toml
+++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml
@@ -116,13 +116,13 @@ custom-protocol = ["tauri/custom-protocol"]
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
# Working directory: frontend
# To update the commit ID, run:
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index 0785d7c68a..3b5e6896f4 100644
--- a/frontend/rust-lib/Cargo.lock
+++ b/frontend/rust-lib/Cargo.lock
@@ -823,7 +823,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-trait",
@@ -847,7 +847,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-trait",
@@ -877,7 +877,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"collab",
@@ -897,7 +897,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"bytes",
@@ -916,7 +916,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"chrono",
@@ -954,7 +954,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"async-stream",
@@ -1035,7 +1035,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=aeca47a#aeca47a7b56414dcde90c73ba427dc5909318fc8"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=6adf750#6adf750dcb7a3f74806b8ffe8c7865bc9d5f85db"
dependencies = [
"anyhow",
"collab",
diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml
index 1675bf3d7b..3875726ff9 100644
--- a/frontend/rust-lib/Cargo.toml
+++ b/frontend/rust-lib/Cargo.toml
@@ -136,13 +136,13 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "aeca47a" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "6adf750" }
# Working directory: frontend
# To update the commit ID, run:
diff --git a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs
index 826d665b39..ec6dab5499 100644
--- a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs
+++ b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs
@@ -256,15 +256,22 @@ impl UserManager {
where
F: FnOnce(&UserAwareness) -> Output,
{
+ // Check if initialization is needed and perform it if necessary
+ if self.user_awareness.lock().await.is_none() {
+ if let Ok(session) = self.get_session() {
+ self.initialize_user_awareness(&session).await;
+ }
+ }
+
let user_awareness = self.user_awareness.lock().await;
match &*user_awareness {
- None => {
- if let Ok(session) = self.get_session() {
- self.initialize_user_awareness(&session).await;
- }
- default_value
+ Some(inner_awareness) => {
+ let inner_awareness_clone = inner_awareness.clone();
+ drop(user_awareness);
+ let result = f(&inner_awareness_clone.lock());
+ result
},
- Some(user_awareness) => f(&user_awareness.lock()),
+ None => default_value,
}
}
}