commit
ec3fd64da5
@ -526,6 +526,7 @@ String formatDurationToTime(Duration duration) {
|
|||||||
|
|
||||||
closeConnection({String? id}) {
|
closeConnection({String? id}) {
|
||||||
if (isAndroid || isIOS) {
|
if (isAndroid || isIOS) {
|
||||||
|
gFFI.chatModel.hideChatOverlay();
|
||||||
Navigator.popUntil(globalKey.currentContext!, ModalRoute.withName("/"));
|
Navigator.popUntil(globalKey.currentContext!, ModalRoute.withName("/"));
|
||||||
} else {
|
} else {
|
||||||
final controller = Get.find<DesktopTabController>();
|
final controller = Get.find<DesktopTabController>();
|
||||||
|
@ -47,7 +47,6 @@ class ChatPage extends StatelessWidget implements PageShape {
|
|||||||
value: chatModel,
|
value: chatModel,
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context).scaffoldBackgroundColor,
|
color: Theme.of(context).scaffoldBackgroundColor,
|
||||||
padding: EdgeInsets.all(14.0),
|
|
||||||
child: Consumer<ChatModel>(
|
child: Consumer<ChatModel>(
|
||||||
builder: (context, chatModel, child) {
|
builder: (context, chatModel, child) {
|
||||||
final currentUser = chatModel.currentUser;
|
final currentUser = chatModel.currentUser;
|
||||||
@ -76,27 +75,20 @@ class ChatPage extends StatelessWidget implements PageShape {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color:
|
color:
|
||||||
Theme.of(context).textTheme.titleLarge?.color),
|
Theme.of(context).textTheme.titleLarge?.color),
|
||||||
inputDecoration: isDesktop
|
inputDecoration: InputDecoration(
|
||||||
? InputDecoration(
|
isDense: true,
|
||||||
isDense: true,
|
hintText: translate('Write a message'),
|
||||||
hintText: translate('Write a message'),
|
filled: true,
|
||||||
filled: true,
|
fillColor: Theme.of(context).colorScheme.background,
|
||||||
fillColor:
|
contentPadding: EdgeInsets.all(10),
|
||||||
Theme.of(context).colorScheme.background,
|
border: OutlineInputBorder(
|
||||||
contentPadding: EdgeInsets.all(10),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
border: OutlineInputBorder(
|
borderSide: const BorderSide(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
width: 1,
|
||||||
borderSide: const BorderSide(
|
style: BorderStyle.solid,
|
||||||
width: 1,
|
),
|
||||||
style: BorderStyle.solid,
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
)
|
|
||||||
: defaultInputDecoration(
|
|
||||||
hintText: translate('Write a message'),
|
|
||||||
fillColor:
|
|
||||||
Theme.of(context).colorScheme.background,
|
|
||||||
),
|
|
||||||
sendButtonBuilder: defaultSendButton(
|
sendButtonBuilder: defaultSendButton(
|
||||||
padding:
|
padding:
|
||||||
EdgeInsets.symmetric(horizontal: 6, vertical: 0),
|
EdgeInsets.symmetric(horizontal: 6, vertical: 0),
|
||||||
|
@ -71,13 +71,19 @@ class DraggableChatWindow extends StatelessWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
chatModel.hideChatWindowOverlay();
|
chatModel.hideChatWindowOverlay();
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.keyboard_arrow_down)),
|
icon: const Icon(
|
||||||
|
Icons.keyboard_arrow_down,
|
||||||
|
color: Colors.white,
|
||||||
|
)),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
chatModel.hideChatWindowOverlay();
|
chatModel.hideChatWindowOverlay();
|
||||||
chatModel.hideChatIconOverlay();
|
chatModel.hideChatIconOverlay();
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.close))
|
icon: const Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: Colors.white,
|
||||||
|
))
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -7,7 +7,7 @@ import 'package:flutter_hbb/models/platform_model.dart';
|
|||||||
import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:window_manager/window_manager.dart';
|
import 'package:window_manager/window_manager.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
|
||||||
import '../consts.dart';
|
import '../consts.dart';
|
||||||
import '../common.dart';
|
import '../common.dart';
|
||||||
@ -185,6 +185,13 @@ class ChatModel with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideChatOverlay() {
|
||||||
|
if (!_isChatOverlayHide()) {
|
||||||
|
hideChatIconOverlay();
|
||||||
|
hideChatWindowOverlay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
showChatPage(int id) async {
|
showChatPage(int id) async {
|
||||||
if (isConnManager) {
|
if (isConnManager) {
|
||||||
if (!_isShowCMChatPage) {
|
if (!_isShowCMChatPage) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user