Skip to content

Commit

Permalink
fix: IME popup (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit authored Jul 13, 2024
1 parent 21f7d67 commit 1d00ee6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 245;
CURRENT_PROJECT_VERSION = 246;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand Down Expand Up @@ -512,7 +512,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 245;
CURRENT_PROJECT_VERSION = 246;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand All @@ -537,7 +537,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 245;
CURRENT_PROJECT_VERSION = 246;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand Down
2 changes: 1 addition & 1 deletion lib/data/res/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

class Build {
static const String name = "GPTBox";
static const int build = 245;
static const int build = 246;
}
6 changes: 4 additions & 2 deletions lib/view/page/home/bottom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ class _HomeBottom extends StatelessWidget {
// },
onTap: () async {
if (_curPage.value != HomePageEnum.chat) {
_dontCloseIme = true;
await _switchPage(HomePageEnum.chat);
_dontCloseIme = false;
}
// Wait IME popup
await Future.delayed(Durations.medium4);
_scrollBottom();
},
onTapOutside: (p0) {
if (_curPage.value == HomePageEnum.chat) return;
_imeFocus.unfocus();
},
contextMenuBuilder: (context, editableTextState) {
//final TextEditingValue value = editableTextState.textEditingValue;
final List<ContextMenuButtonItem> buttonItems =
Expand Down
6 changes: 1 addition & 5 deletions lib/view/page/home/var.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ ChatHistory? get _curChat => _allHistories[_curChatId];
final _loadingChatIds = <String>{};
final _loadingChatIdRN = RNode();

var _dontCloseIme = false;
final _curPage = HomePageEnum.chat.vn
..addListener(() {
if (!_dontCloseIme) _imeFocus.unfocus();
});
final _curPage = HomePageEnum.chat.vn;

final _imeFocus = FocusNode();

Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ packages:
dependency: "direct dev"
description:
path: "."
ref: "v1.0.32"
resolved-ref: "66b36278a2f9f60da3dba804e81148afc60e342e"
ref: "v1.0.33"
resolved-ref: "885c3479db8867f1c4078b97f65578ee2cbc9466"
url: "https://github.com/lppcg/fl_build.git"
source: git
version: "1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: gpt_box
description: "A third-party GPT Client for OpenAI API."
publish_to: 'none'
version: 1.0.245+245
version: 1.0.246+246

environment:
sdk: '>=3.3.0 <4.0.0'
Expand Down Expand Up @@ -46,7 +46,7 @@ dev_dependencies:
fl_build:
git:
url: https://github.com/lppcg/fl_build.git
ref: v1.0.32
ref: v1.0.33
# path: ../fl_build

flutter:
Expand Down

0 comments on commit 1d00ee6

Please sign in to comment.