mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 02:56:58 +08:00
opt: unread & zan grpc & readlist open with browser (#852)
* opt: unread * opt: zan grpc * feat: readlist open with browser
This commit is contained in:
committed by
GitHub
parent
8d34e6f340
commit
72734d4b4e
@@ -1,5 +1,10 @@
|
||||
enum MsgUnReadType { pm, reply, at, like, sysMsg }
|
||||
enum MsgUnReadType {
|
||||
pm('私信'),
|
||||
reply('回复我的'),
|
||||
at('@我'),
|
||||
like('收到的赞'),
|
||||
sysMsg('系统通知');
|
||||
|
||||
extension MsgUnReadTypeExt on MsgUnReadType {
|
||||
String get title => const ['私信', '回复我的', '@我', '收到的赞', '系统通知'][index];
|
||||
final String title;
|
||||
const MsgUnReadType(this.title);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
class MsgFeedUnread {
|
||||
MsgFeedUnread({
|
||||
this.at = 0,
|
||||
this.chat = 0,
|
||||
this.like = 0,
|
||||
this.reply = 0,
|
||||
this.sysMsg = 0,
|
||||
this.up = 0,
|
||||
});
|
||||
import 'package:fixnum/fixnum.dart';
|
||||
|
||||
class MsgFeedUnread {
|
||||
int at = 0;
|
||||
int chat = 0;
|
||||
int like = 0;
|
||||
int reply = 0;
|
||||
int sysMsg = 0;
|
||||
int up = 0;
|
||||
|
||||
MsgFeedUnread.fromJson(Map<String, dynamic> json) {
|
||||
at = json['at'] ?? 0;
|
||||
chat = json['chat'] ?? 0;
|
||||
like = json['like'] ?? 0;
|
||||
reply = json['reply'] ?? 0;
|
||||
sysMsg = json['sys_msg'] ?? 0;
|
||||
up = json['up'] ?? 0;
|
||||
MsgFeedUnread.fromJson(Map<String, Int64> json) {
|
||||
at = json['at']?.toInt() ?? 0;
|
||||
like = json['like']?.toInt() ?? 0;
|
||||
reply = json['reply']?.toInt() ?? 0;
|
||||
sysMsg = json['sys_msg']?.toInt() ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user