Skip to content

Commit

Permalink
bug fixes (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ida631 authored Dec 23, 2024
1 parent 6f00879 commit 9c86c1a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions lib/presentation/chat/views/chat_message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,16 @@ class _ChatMessageListState extends State<ChatMessageList> {

if (isShiftPressed) {
// Add a newline only when Shift + Enter is pressed
final text = textController.text.trim(); // Clean up text
final text = textController.text; // Clean up text
textController.text = "$text\n";
textController.selection = TextSelection.fromPosition(
TextPosition(offset: textController.text.length),
);


} else {
// Submit the text and clear TextField on Enter
final text = textController.text.trim(); // Remove extra spaces/newlines
final text = textController.text; // Remove extra spaces/newlines
if (text.isNotEmpty) {
textController.clear(); // Clear input immediately
viewModel.sendInputMessage(text); // Send message
Expand Down Expand Up @@ -238,7 +240,7 @@ class _ChatMessageListState extends State<ChatMessageList> {
onPressed: textController.text.isEmpty
? null
: () {
final text = textController.text.trim(); // Clean text
final text = textController.text; // Clean text
if (text.isNotEmpty) {
textController.clear(); // Clear input field
viewModel.sendInputMessage(text);
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/settings/views/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class _LoginPageState extends State<LoginPage> {
padding: EdgeInsets.symmetric(horizontal: 8.0), // Space around "OR"
child: Text(
'OR',
style: TextStyle(fontSize: 15, color: Colors.black54), // Style for "OR"
style: TextStyle(fontSize: 15, color: Colors.black), // Style for "OR"
),
),
Expanded(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: swiftcomp
description: A cross-platform composite calculator developed with Flutter, based on SwiftComp, designed for engineers and researchers. Available on iOS, Android, and Web.
publish_to: none

version: 6.2.5+2024111520
version: 6.2.6+2024111520

environment:
sdk: ">=2.15.0 <3.0.0"
Expand Down

0 comments on commit 9c86c1a

Please sign in to comment.