Skip to content

Commit

Permalink
chore: update editor version (#5513)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 authored Jun 12, 2024
1 parent bd5f5f8 commit 15329b3
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 30 deletions.
2 changes: 1 addition & 1 deletion frontend/appflowy_flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "io.appflowy.appflowy"
minSdkVersion 23
minSdkVersion 24
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/document/application/document_bloc.dart';
import 'package:appflowy/plugins/document/presentation/editor_configuration.dart';
Expand Down Expand Up @@ -31,6 +28,8 @@ import 'package:collection/collection.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/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

final codeBlockLocalization = CodeBlockLocalizations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,13 @@ class _MobileToolbarState extends State<_MobileToolbar>
return ValueListenableBuilder(
valueListenable: cachedKeyboardHeight,
builder: (_, height, ___) {
var paddingHeight = height;
if (Platform.isAndroid) {
paddingHeight += MediaQuery.of(context).viewPadding.bottom;
}
return AnimatedContainer(
duration: const Duration(microseconds: 110),
height: height,
height: paddingHeight,
child: ValueListenableBuilder(
valueListenable: showMenuNotifier,
builder: (_, showingMenu, __) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ class EditorStyleCustomizer {
DefaultAppearanceSettings.getDefaultSelectionColor(context),
defaultTextDirection: appearance.defaultTextDirection,
textStyleConfiguration: TextStyleConfiguration(
lineHeight: 1.2,
applyHeightToFirstAscent: true,
applyHeightToLastDescent: true,
// applyHeightToFirstAscent: true,
// applyHeightToLastDescent: true,
text: baseTextStyle(fontFamily).copyWith(
fontSize: fontSize,
color: afThemeExtension.onBackground,
Expand Down Expand Up @@ -106,6 +105,7 @@ class EditorStyleCustomizer {
final textScaleFactor =
context.read<AppearanceSettingsCubit>().state.textScaleFactor;
final baseTextStyle = this.baseTextStyle(fontFamily);

return EditorStyle.mobile(
padding: padding,
defaultTextDirection: defaultTextDirection,
Expand Down
26 changes: 7 additions & 19 deletions frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:appflowy/mobile/application/mobile_router.dart';
import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart';
import 'package:appflowy/shared/feature_flags.dart';
Expand All @@ -25,6 +22,8 @@ import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';

Expand Down Expand Up @@ -234,23 +233,12 @@ class _ApplicationWidgetState extends State<ApplicationWidget> {

void _setSystemOverlayStyle(AppearanceSettingsState state) {
if (Platform.isAndroid) {
SystemUiOverlayStyle style = SystemUiOverlayStyle.dark;
final themeMode = state.themeMode;
if (themeMode == ThemeMode.dark) {
style = SystemUiOverlayStyle.light;
} else if (themeMode == ThemeMode.light) {
style = SystemUiOverlayStyle.dark;
} else {
final brightness = Theme.of(context).brightness;
// reverse the brightness of the system status bar.
style = brightness == Brightness.dark
? SystemUiOverlayStyle.light
: SystemUiOverlayStyle.dark;
}

SystemChrome.setEnabledSystemUIMode(
SystemUiMode.edgeToEdge,
overlays: [],
);
SystemChrome.setSystemUIOverlayStyle(
style.copyWith(
statusBarColor: Colors.transparent,
const SystemUiOverlayStyle(
systemNavigationBarColor: Colors.transparent,
),
);
Expand Down
4 changes: 2 additions & 2 deletions frontend/appflowy_flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47"
resolved-ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47"
ref: d73e8893d1f1b06566ebed5868698be75c6b7f93
resolved-ref: d73e8893d1f1b06566ebed5868698be75c6b7f93
url: "https://github.com/AppFlowy-IO/appflowy-editor.git"
source: git
version: "2.5.1"
Expand Down
2 changes: 1 addition & 1 deletion frontend/appflowy_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ dependency_overrides:
appflowy_editor:
git:
url: https://github.com/AppFlowy-IO/appflowy-editor.git
ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47"
ref: "d73e8893d1f1b06566ebed5868698be75c6b7f93"

sheet:
git:
Expand Down

0 comments on commit 15329b3

Please sign in to comment.