chore: update editor version (#5513)

This commit is contained in:
Lucas.Xu 2024-06-13 07:58:05 +08:00 committed by GitHub
parent bd5f5f8b9e
commit 15329b39d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 21 additions and 30 deletions

View File

@ -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

View File

@ -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';
@ -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(

View File

@ -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, __) {

View File

@ -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,
@ -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,

View File

@ -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';
@ -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';
@ -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,
),
);

View File

@ -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"

View File

@ -185,7 +185,7 @@ dependency_overrides:
appflowy_editor:
git:
url: https://github.com/AppFlowy-IO/appflowy-editor.git
ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47"
ref: "d73e8893d1f1b06566ebed5868698be75c6b7f93"
sheet:
git: