mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-18 16:16:14 +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
@@ -18,12 +18,12 @@ class DynGrpc {
|
||||
// );
|
||||
// }
|
||||
|
||||
static Future dynRed() {
|
||||
return GrpcRepo.request(
|
||||
static Future<int?> dynRed() async {
|
||||
final res = await GrpcRepo.request(
|
||||
GrpcUrl.dynRed,
|
||||
DynRedReq(tabOffset: [TabOffset(tab: 1)]),
|
||||
DynRedReply.fromBuffer,
|
||||
onSuccess: (response) => response.dynRedItem.count.toInt(),
|
||||
);
|
||||
return res.dataOrNull?.dynRedItem.count.toInt();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user