fix: get mid

This commit is contained in:
bggRGjQaUbCoE
2024-10-20 11:58:06 +08:00
parent 73076ba13a
commit 9d48072515
6 changed files with 7 additions and 6 deletions

View File

@@ -287,7 +287,7 @@ class _CreatePanelState extends State<CreatePanel> {
} }
} }
dynamic result = await MsgHttp.createDynamic( dynamic result = await MsgHttp.createDynamic(
mid: GStorage.userInfo.get('userInfoCache').mid, mid: GStorage.userInfo.get('userInfoCache')?.mid,
rawText: _ctr.text, rawText: _ctr.text,
pics: pics, pics: pics,
publishTime: _publishTime != null publishTime: _publishTime != null

View File

@@ -196,7 +196,7 @@ class _RepostPanelState extends State<RepostPanel> {
Future _onRepost() async { Future _onRepost() async {
dynamic result = await MsgHttp.createDynamic( dynamic result = await MsgHttp.createDynamic(
mid: GStorage.userInfo.get('userInfoCache').mid, mid: GStorage.userInfo.get('userInfoCache')?.mid,
dynIdStr: widget.item.idStr, dynIdStr: widget.item.idStr,
rawText: _ctr.text, rawText: _ctr.text,
); );

View File

@@ -232,7 +232,7 @@ class MorePanel extends StatelessWidget {
minLeadingWidth: 0, minLeadingWidth: 0,
), ),
if (item.modules.moduleAuthor.mid == if (item.modules.moduleAuthor.mid ==
GStorage.userInfo.get('userInfoCache').mid) GStorage.userInfo.get('userInfoCache')?.mid)
ListTile( ListTile(
onTap: () async { onTap: () async {
Get.back(); Get.back();

View File

@@ -232,7 +232,7 @@ class MorePanel extends StatelessWidget {
minLeadingWidth: 0, minLeadingWidth: 0,
), ),
if (item.modules.moduleAuthor.mid == if (item.modules.moduleAuthor.mid ==
GStorage.userInfo.get('userInfoCache').mid) GStorage.userInfo.get('userInfoCache')?.mid)
ListTile( ListTile(
onTap: () async { onTap: () async {
Get.back(); Get.back();

View File

@@ -71,6 +71,6 @@ class MediaController extends CommonController {
Future<LoadingState> customGetData() => UserHttp.userfavFolder( Future<LoadingState> customGetData() => UserHttp.userfavFolder(
pn: 1, pn: 1,
ps: 5, ps: 5,
mid: mid ?? GStorage.userInfo.get('userInfoCache').mid, mid: mid ?? GStorage.userInfo.get('userInfoCache')?.mid,
); );
} }

View File

@@ -51,7 +51,8 @@ class ChatItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool isOwner = item.senderUid == GStorage.userInfo.get('userInfoCache').mid; bool isOwner =
item.senderUid == GStorage.userInfo.get('userInfoCache')?.mid;
bool isPic = item.msgType == MsgType.pic.value; // 图片 bool isPic = item.msgType == MsgType.pic.value; // 图片
bool isText = item.msgType == MsgType.text.value; // 文本 bool isText = item.msgType == MsgType.text.value; // 文本