Skip to content

Commit 81532d0

Browse files
authored
chore: use light haptic feedback (#5838)
* chore: use light haptic feedback * chore: optimize tabbar & side action animation
1 parent 735a09b commit 81532d0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

frontend/appflowy_flutter/lib/mobile/presentation/base/gesture.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class _AnimatedGestureDetectorState extends State<AnimatedGestureDetector> {
3636
onTapUp: (details) {
3737
setState(() => scale = 1.0);
3838

39-
HapticFeedbackType.vibrate.call();
39+
HapticFeedbackType.light.call();
4040

4141
widget.onTapUp();
4242
},

frontend/appflowy_flutter/lib/mobile/presentation/home/space/mobile_space.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,16 @@ class _Pages extends StatelessWidget {
167167
onSelected: context.pushView,
168168
endActionPane: (context) {
169169
final view = context.read<ViewBloc>().state.view;
170+
final actions = [
171+
MobilePaneActionType.more,
172+
if (view.layout == ViewLayoutPB.Document)
173+
MobilePaneActionType.add,
174+
];
170175
return buildEndActionPane(
171176
context,
172-
[
173-
MobilePaneActionType.more,
174-
if (view.layout == ViewLayoutPB.Document)
175-
MobilePaneActionType.add,
176-
],
177+
actions,
177178
spaceType: spaceType,
178-
spaceRatio: 4,
179+
spaceRatio: actions.length == 1 ? 3 : 4,
179180
);
180181
},
181182
),

frontend/appflowy_flutter/lib/mobile/presentation/home/tab/_tab_bar.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ class MobileSpaceTabBar extends StatelessWidget {
2323
final labelStyle = baseStyle?.copyWith(
2424
fontWeight: FontWeight.w600,
2525
fontSize: 16.0,
26+
height: 20 / 16,
2627
);
2728
final unselectedLabelStyle = baseStyle?.copyWith(
2829
fontWeight: FontWeight.w400,
2930
fontSize: 15.0,
31+
height: 20 / 15,
3032
);
3133

3234
return Container(

0 commit comments

Comments
 (0)