Skip to content

Commit

Permalink
Merge branch 'fix/message' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
opjoobe committed Jul 29, 2022
2 parents b21aa40 + f6525d3 commit 8f42391
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/screens/message/chat_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:intl/intl.dart';

class ChatScreen extends StatefulWidget {
var chatroomID;
int chatroomID;
int loginID;
int friendID;
String friendName;
Expand All @@ -33,7 +33,7 @@ class _ChatScreenState extends State<ChatScreen> {
final TextEditingController _messageController = TextEditingController();
final ScrollController _scrollController = ScrollController();

getChatMessages(chatroomid) async {
getChatMessages(int chatroomid) async {
try {
var dio = Dio();
Response response = await dio.get(
Expand Down
5 changes: 3 additions & 2 deletions lib/screens/mypage/profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,12 @@ class _ProfilePageState extends State<ProfilePage> {
var roomID =
await getChatRoom(loginID, widget.friendId);
if (!mounted) return;
if (int.parse(roomID) > 0) {
int chatroomID = int.parse(roomID);
if (chatroomID > 0) {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return ChatScreen(
chatroomID: roomID, // chatroomID // 수정필요
chatroomID: chatroomID, // chatroomID // 수정필요
loginID: loginID,
friendID: widget.friendId!, // not isMe
friendName: user.nickname,
Expand Down

0 comments on commit 8f42391

Please sign in to comment.