Merge branch 'feature-sendMsg'
This commit is contained in:
@ -69,7 +69,14 @@ class _WhisperPageState extends State<WhisperPage> {
|
|||||||
children: [
|
children: [
|
||||||
..._whisperController.noticesList.map((element) {
|
..._whisperController.noticesList.map((element) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () => Get.toNamed(element['path']),
|
onTap: () {
|
||||||
|
Get.toNamed(element['path']);
|
||||||
|
|
||||||
|
if (element['count'] > 0) {
|
||||||
|
element['count'] = 0;
|
||||||
|
}
|
||||||
|
_whisperController.noticesList.refresh();
|
||||||
|
},
|
||||||
onLongPress: () {},
|
onLongPress: () {},
|
||||||
borderRadius: StyleString.mdRadius,
|
borderRadius: StyleString.mdRadius,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
// ignore_for_file: must_be_immutable
|
// ignore_for_file: must_be_immutable
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -8,7 +9,6 @@ import 'package:pilipala/common/widgets/network_img_layer.dart';
|
|||||||
import 'package:pilipala/utils/route_push.dart';
|
import 'package:pilipala/utils/route_push.dart';
|
||||||
import 'package:pilipala/utils/utils.dart';
|
import 'package:pilipala/utils/utils.dart';
|
||||||
import 'package:pilipala/utils/storage.dart';
|
import 'package:pilipala/utils/storage.dart';
|
||||||
|
|
||||||
import '../../../http/search.dart';
|
import '../../../http/search.dart';
|
||||||
|
|
||||||
enum MsgType {
|
enum MsgType {
|
||||||
@ -409,12 +409,6 @@ class ChatItem extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(width: safeDistanceval),
|
const SizedBox(width: safeDistanceval),
|
||||||
if (isOwner)
|
|
||||||
Text(
|
|
||||||
Utils.dateFormat(item.timestamp),
|
|
||||||
style: Theme.of(context).textTheme.labelSmall!.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.outline),
|
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
constraints: const BoxConstraints(
|
constraints: const BoxConstraints(
|
||||||
maxWidth: 300.0, // 设置最大宽度为200.0
|
maxWidth: 300.0, // 设置最大宽度为200.0
|
||||||
@ -444,51 +438,45 @@ class ChatItem extends StatelessWidget {
|
|||||||
right: 8,
|
right: 8,
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(paddingVal),
|
padding: const EdgeInsets.all(paddingVal),
|
||||||
child: messageContent(context),
|
child: Column(
|
||||||
// child: Column(
|
crossAxisAlignment: isOwner
|
||||||
// crossAxisAlignment: isOwner
|
? CrossAxisAlignment.end
|
||||||
// ? CrossAxisAlignment.end
|
: CrossAxisAlignment.start,
|
||||||
// : CrossAxisAlignment.start,
|
children: [
|
||||||
// children: [
|
messageContent(context),
|
||||||
// messageContent(context),
|
SizedBox(height: isPic ? 7 : 4),
|
||||||
// SizedBox(height: isPic ? 7 : 2),
|
Row(
|
||||||
// Row(
|
mainAxisSize: MainAxisSize.min,
|
||||||
// mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
// children: [
|
Text(
|
||||||
// Text(
|
Utils.dateFormat(item.timestamp),
|
||||||
// Utils.dateFormat(item.timestamp),
|
style: Theme.of(context)
|
||||||
// style: Theme.of(context)
|
.textTheme
|
||||||
// .textTheme
|
.labelSmall!
|
||||||
// .labelSmall!
|
.copyWith(
|
||||||
// .copyWith(
|
color: isOwner
|
||||||
// color: isOwner
|
? Theme.of(context)
|
||||||
// ? Theme.of(context)
|
.colorScheme
|
||||||
// .colorScheme
|
.onPrimary
|
||||||
// .onPrimary
|
.withOpacity(0.8)
|
||||||
// .withOpacity(0.8)
|
: Theme.of(context)
|
||||||
// : Theme.of(context)
|
.colorScheme
|
||||||
// .colorScheme
|
.onSecondaryContainer
|
||||||
// .onSecondaryContainer
|
.withOpacity(0.8)),
|
||||||
// .withOpacity(0.8)),
|
),
|
||||||
// ),
|
item.msgStatus == 1
|
||||||
// item.msgStatus == 1
|
? Text(
|
||||||
// ? Text(
|
' 已撤回',
|
||||||
// ' 已撤回',
|
style: Theme.of(context)
|
||||||
// style:
|
.textTheme
|
||||||
// Theme.of(context).textTheme.labelSmall!,
|
.labelSmall!,
|
||||||
// )
|
)
|
||||||
// : const SizedBox()
|
: const SizedBox()
|
||||||
// ],
|
],
|
||||||
// )
|
)
|
||||||
// ],
|
],
|
||||||
// ),
|
|
||||||
),
|
|
||||||
if (!isOwner)
|
|
||||||
Text(
|
|
||||||
Utils.dateFormat(item.timestamp),
|
|
||||||
style: Theme.of(context).textTheme.labelSmall!.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.outline),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(width: safeDistanceval),
|
const SizedBox(width: safeDistanceval),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user