mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
opt: type & grpc message (#842)
* opt: grpc type * opt: grpc message * opt: http type
This commit is contained in:
committed by
GitHub
parent
7b4f08bb05
commit
024e74115e
@@ -3,7 +3,6 @@ import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart'
|
||||
import 'package:PiliPlus/grpc/im.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/common/common_data_controller.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:protobuf/protobuf.dart' show PbMap;
|
||||
|
||||
@@ -36,10 +35,10 @@ class WhisperSettingsController
|
||||
ImGrpc.getImSettings(type: imSettingType);
|
||||
|
||||
Future<bool> onSet(PbMap<int, Setting> settings) async {
|
||||
var res = await ImGrpc.setImSettings(settings: settings);
|
||||
if (!res['status']) {
|
||||
SmartDialog.showToast('err: ${res['msg']}');
|
||||
final res = await ImGrpc.setImSettings(settings: settings);
|
||||
if (!res.isSuccess) {
|
||||
res.toast();
|
||||
}
|
||||
return res['status'];
|
||||
return res.isSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user