fix live room can not log out

master
laiiihz 4 years ago
parent ecb83cd095
commit 4017afce18

@ -57,7 +57,7 @@ void main() async {
// useEncrypt: true
);
//
bool isDebug = false;
bool isDebug = true;
AppConfig.setDebug(isDebug);
//

@ -1033,9 +1033,17 @@ class _LivePageState extends State<LivePage> with WidgetsBindingObserver {
_stopLive() async {
_livePusher?.stopPush();
if (_streamInfoModel != null) {
await TencentImPlugin.quitGroup(groupId: _streamInfoModel.groupId);
try {
await TencentImPlugin.quitGroup(groupId: _streamInfoModel.groupId);
} catch (e) {
print(e);
}
TencentImPlugin.removeListener(parseMessage);
await TencentImPlugin.logout();
try {
await TencentImPlugin.logout();
} catch (e) {
print(e);
}
}
if (_isStream)
await HttpManager.post(LiveAPI.exitLive, {

Loading…
Cancel
Save