Skip to content

Commit

Permalink
fix: fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
zmhu committed Sep 27, 2023
1 parent 644676a commit fa2da81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/controller/chat_message_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ class ChatMessageController extends GetxController {
onDone: () {
logger.d("done ------------------- ");
saveMessage(input);
targetMessage.updated = getCurrentDateTime(); // Update lastupdated
saveMessage(targetMessage);
if (targetMessage.generating == true) {
targetMessage.closeStream();
Expand Down
5 changes: 5 additions & 0 deletions lib/util/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter_tiktoken/flutter_tiktoken.dart';
import 'package:geek_chat/service/http_service.dart';
import 'package:get/get.dart';
import 'package:logger/logger.dart';
import 'package:moment_dart/moment_dart.dart';

enum DeviceType { small, wide }

Expand Down Expand Up @@ -64,3 +65,7 @@ int convertVersionToNumber(String version) {
versionCells = versionCells.map((i) => int.parse(i)).toList();
return versionCells[0] * 100000 + versionCells[1] * 1000 + versionCells[2];
}

int getCurrentDateTime() {
return int.parse(Moment.now().format('YYYYMMDDHHmmssSSS').toString());
}

0 comments on commit fa2da81

Please sign in to comment.