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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
[flutter]: modify action item's gesture behaviour
appflowyefc1adecdfa2
diff --git a/app_flowy/lib/startup/tasks/sdk_task.dart b/app_flowy/lib/startup/tasks/sdk_task.dartindex df695241af..ce0dd1284b 100644--- a/app_flowy/lib/startup/tasks/sdk_task.dart+++ b/app_flowy/lib/startup/tasks/sdk_task.dart@@ -40,7 +40,7 @@ class ApplicationBlocObserver extends BlocObserver {@override// ignore: unnecessary_overridesvoid onTransition(Bloc bloc, Transition transition) {- Log.debug("[current]: ${transition.currentState} \n[next]: ${transition.nextState}");+ // Log.debug("[current]: ${transition.currentState} \n[next]: ${transition.nextState}");super.onTransition(bloc, transition);}diff --git a/app_flowy/lib/workspace/presentation/stack_page/doc/styles.dart b/app_flowy/lib/workspace/presentation/stack_page/doc/styles.dartindex cd143c97d9..7ee0b40438 100644--- a/app_flowy/lib/workspace/presentation/stack_page/doc/styles.dart+++ b/app_flowy/lib/workspace/presentation/stack_page/doc/styles.dart@@ -1,5 +1,6 @@import 'package:flutter/material.dart';import 'package:flutter_quill/flutter_quill.dart';+import 'package:provider/provider.dart';import 'package:tuple/tuple.dart';import 'package:flowy_infra/theme.dart';@@ -7,8 +8,10 @@ DefaultStyles customStyles(BuildContext context) {const baseSpacing = Tuple2<double, double>(6, 0);final defaultTextStyle = DefaultTextStyle.of(context);final baseStyle = defaultTextStyle.style.copyWith(- fontSize: 16,+ fontSize: 18,height: 1.3,+ fontWeight: FontWeight.w400,+ letterSpacing: 0.6,);final theme = context.watch<AppTheme>();final themeData = theme.themeData;diff --git a/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/action.dart b/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/action.dartindex a3f941fc04..9cd4db5922 100644--- a/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/action.dart+++ b/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/action.dart@@ -63,6 +63,7 @@ class ActionItem extends StatelessWidget {config: HoverDisplayConfig(hoverColor: theme.hover),builder: (context, onHover) {return GestureDetector(+ behavior: HitTestBehavior.opaque,onTap: () => onSelected(action),child: Row(children: [diff --git a/rust-lib/flowy-document/src/services/doc/edit/doc_actor.rs b/rust-lib/flowy-document/src/services/doc/edit/doc_actor.rsindex c9d49b611a..90e67a5b71 100644--- a/rust-lib/flowy-document/src/services/doc/edit/doc_actor.rs+++ b/rust-lib/flowy-document/src/services/doc/edit/doc_actor.rs@@ -2,16 +2,14 @@ use crate::{entities::doc::{RevId, Revision},errors::DocResult,services::doc::{- edit::{- message::{DocumentMsg, TransformDeltas},- },+ edit::message::{DocumentMsg, TransformDeltas},Document,},};use async_stream::stream;use flowy_ot::core::{Delta, OperationTransformable};use futures::stream::StreamExt;-use std::{convert::TryFrom, sync::Arc};+use std::{convert::TryFrom, sync::Arc, thread};use tokio::sync::{mpsc, RwLock};pub struct DocumentActor {@@ -20,10 +18,7 @@ pub struct DocumentActor {}impl DocumentActor {- pub fn new(- delta: Delta,- receiver: mpsc::UnboundedReceiver<DocumentMsg>,- ) -> Self {+ pub fn new(delta: Delta, receiver: mpsc::UnboundedReceiver<DocumentMsg>) -> Self {let document = Arc::new(RwLock::new(Document::from_delta(delta)));Self {document,@@ -116,12 +111,16 @@ impl DocumentActor {}async fn compose_delta(&self, delta: Delta) -> DocResult<()> {- let result = self.document.write().await.compose_delta(&delta);+ // log::debug!("{:?} thread handle_message", thread::current(),);+ let mut document = self.document.write().await;+ let result = document.compose_delta(&delta);log::debug!("Client compose push delta: {}. result: {}",delta.to_json(),- self.document.read().await.to_json()+ document.to_json());+ drop(document);+result}}