mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
refa: whisper page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,21 +1,24 @@
|
|||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PBadge extends StatelessWidget {
|
class PBadge extends StatelessWidget {
|
||||||
final String? text;
|
final String? text;
|
||||||
|
|
||||||
|
final bool isStack;
|
||||||
final double? top;
|
final double? top;
|
||||||
final double? right;
|
final double? right;
|
||||||
final double? bottom;
|
final double? bottom;
|
||||||
final double? left;
|
final double? left;
|
||||||
final String? type;
|
|
||||||
final String? size;
|
|
||||||
final String? stack;
|
|
||||||
final double? fs;
|
|
||||||
final String? semanticsLabel;
|
|
||||||
final bool bold;
|
|
||||||
final double? textScaleFactor;
|
|
||||||
final EdgeInsets? padding;
|
final EdgeInsets? padding;
|
||||||
|
|
||||||
|
final PBadgeType type;
|
||||||
|
final PBadgeSize size;
|
||||||
|
|
||||||
|
final double fontSize;
|
||||||
|
final bool isBold;
|
||||||
|
final double? textScaleFactor;
|
||||||
|
|
||||||
const PBadge({
|
const PBadge({
|
||||||
super.key,
|
super.key,
|
||||||
required this.text,
|
required this.text,
|
||||||
@@ -23,12 +26,11 @@ class PBadge extends StatelessWidget {
|
|||||||
this.right,
|
this.right,
|
||||||
this.bottom,
|
this.bottom,
|
||||||
this.left,
|
this.left,
|
||||||
this.type = 'primary',
|
this.type = PBadgeType.primary,
|
||||||
this.size = 'medium',
|
this.size = PBadgeSize.medium,
|
||||||
this.stack = 'position',
|
this.isStack = true,
|
||||||
this.fs = 11,
|
this.fontSize = 11,
|
||||||
this.semanticsLabel,
|
this.isBold = true,
|
||||||
this.bold = true,
|
|
||||||
this.textScaleFactor,
|
this.textScaleFactor,
|
||||||
this.padding,
|
this.padding,
|
||||||
});
|
});
|
||||||
@@ -40,37 +42,39 @@ class PBadge extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ColorScheme theme = Theme.of(context).colorScheme;
|
ColorScheme theme = Theme.of(context).colorScheme;
|
||||||
// 背景色
|
|
||||||
Color bgColor = theme.primary;
|
Color bgColor;
|
||||||
// 前景色
|
Color color;
|
||||||
Color color = theme.onPrimary;
|
|
||||||
// 边框色
|
|
||||||
Color borderColor = Colors.transparent;
|
Color borderColor = Colors.transparent;
|
||||||
if (type == 'gray') {
|
|
||||||
bgColor = Colors.black45;
|
switch (type) {
|
||||||
color = Colors.white;
|
case PBadgeType.primary:
|
||||||
} else if (type == 'color') {
|
bgColor = theme.primary;
|
||||||
|
color = theme.onPrimary;
|
||||||
|
case PBadgeType.secondary:
|
||||||
bgColor = theme.secondaryContainer.withOpacity(0.5);
|
bgColor = theme.secondaryContainer.withOpacity(0.5);
|
||||||
color = theme.onSecondaryContainer;
|
color = theme.onSecondaryContainer;
|
||||||
} else if (type == 'line') {
|
case PBadgeType.gray:
|
||||||
bgColor = Colors.transparent;
|
bgColor = Colors.black45;
|
||||||
color = theme.primary;
|
color = Colors.white;
|
||||||
borderColor = theme.primary;
|
case PBadgeType.error:
|
||||||
} else if (type == 'error') {
|
|
||||||
bgColor = theme.error;
|
bgColor = theme.error;
|
||||||
color = theme.onError;
|
color = theme.onError;
|
||||||
|
case PBadgeType.line_primary:
|
||||||
|
color = theme.primary;
|
||||||
|
bgColor = Colors.transparent;
|
||||||
|
borderColor = theme.primary;
|
||||||
|
case PBadgeType.line_secondary:
|
||||||
|
color = theme.secondary;
|
||||||
|
bgColor = Colors.transparent;
|
||||||
|
borderColor = theme.secondary;
|
||||||
}
|
}
|
||||||
|
|
||||||
late EdgeInsets paddingStyle =
|
late EdgeInsets paddingStyle =
|
||||||
const EdgeInsets.symmetric(vertical: 2, horizontal: 3);
|
const EdgeInsets.symmetric(vertical: 2, horizontal: 3);
|
||||||
double fontSize = 11;
|
BorderRadius br = size == PBadgeSize.small
|
||||||
BorderRadius br = const BorderRadius.all(Radius.circular(4));
|
? const BorderRadius.all(Radius.circular(3))
|
||||||
|
: const BorderRadius.all(Radius.circular(4));
|
||||||
if (size == 'small') {
|
|
||||||
paddingStyle = const EdgeInsets.symmetric(vertical: 2, horizontal: 3);
|
|
||||||
fontSize = 11;
|
|
||||||
br = const BorderRadius.all(Radius.circular(3));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget content = Container(
|
Widget content = Container(
|
||||||
padding: padding ?? paddingStyle,
|
padding: padding ?? paddingStyle,
|
||||||
@@ -86,20 +90,19 @@ class PBadge extends StatelessWidget {
|
|||||||
: null,
|
: null,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
height: 1,
|
height: 1,
|
||||||
fontSize: fs ?? fontSize,
|
fontSize: fontSize,
|
||||||
color: color,
|
color: color,
|
||||||
fontWeight: bold ? FontWeight.bold : null,
|
fontWeight: isBold ? FontWeight.bold : null,
|
||||||
),
|
),
|
||||||
strutStyle: StrutStyle(
|
strutStyle: StrutStyle(
|
||||||
leading: 0,
|
leading: 0,
|
||||||
height: 1,
|
height: 1,
|
||||||
fontSize: fs ?? fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: bold ? FontWeight.bold : null,
|
fontWeight: isBold ? FontWeight.bold : null,
|
||||||
),
|
),
|
||||||
semanticsLabel: semanticsLabel,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (stack == 'position') {
|
if (isStack) {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
top: top,
|
top: top,
|
||||||
left: left,
|
left: left,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:PiliPlus/common/constants.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/nine_grid_view.dart';
|
import 'package:PiliPlus/common/widgets/image/nine_grid_view.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/common/image_preview_type.dart';
|
import 'package:PiliPlus/models/common/image_preview_type.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:PiliPlus/utils/storage.dart';
|
import 'package:PiliPlus/utils/storage.dart';
|
||||||
@@ -168,7 +169,7 @@ Widget imageView(
|
|||||||
text: 'Live',
|
text: 'Live',
|
||||||
right: 8,
|
right: 8,
|
||||||
bottom: 8,
|
bottom: 8,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
)
|
)
|
||||||
else if (picArr[index].isLongPic)
|
else if (picArr[index].isLongPic)
|
||||||
const PBadge(
|
const PBadge(
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/progress_bar/video_progress_indicator.da
|
|||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/model_hot_video_item.dart';
|
import 'package:PiliPlus/models/model_hot_video_item.dart';
|
||||||
import 'package:PiliPlus/models/model_video.dart';
|
import 'package:PiliPlus/models/model_video.dart';
|
||||||
import 'package:PiliPlus/models/search/result.dart';
|
import 'package:PiliPlus/models/search/result.dart';
|
||||||
@@ -158,7 +159,7 @@ class VideoCardH extends StatelessWidget {
|
|||||||
: '${Utils.timeFormat(progress)}/${Utils.timeFormat(videoItem.duration)}',
|
: '${Utils.timeFormat(progress)}/${Utils.timeFormat(videoItem.duration)}',
|
||||||
right: 6,
|
right: 6,
|
||||||
bottom: 8,
|
bottom: 8,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -175,14 +176,14 @@ class VideoCardH extends StatelessWidget {
|
|||||||
text: Utils.timeFormat(videoItem.duration),
|
text: Utils.timeFormat(videoItem.duration),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
if (type != 'video')
|
if (type != 'video')
|
||||||
PBadge(
|
PBadge(
|
||||||
text: type,
|
text: type,
|
||||||
left: 6.0,
|
left: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'primary',
|
type: PBadgeType.primary,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/progress_bar/video_progress_indicator.dart';
|
import 'package:PiliPlus/common/widgets/progress_bar/video_progress_indicator.dart';
|
||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/space_archive/item.dart';
|
import 'package:PiliPlus/models/space_archive/item.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
@@ -112,8 +113,8 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
|||||||
right: 6.0,
|
right: 6.0,
|
||||||
top: 6.0,
|
top: 6.0,
|
||||||
type: videoItem.badges!.first.text == '充电专属'
|
type: videoItem.badges!.first.text == '充电专属'
|
||||||
? 'error'
|
? PBadgeType.error
|
||||||
: 'primary',
|
: PBadgeType.primary,
|
||||||
),
|
),
|
||||||
if (videoItem.history != null) ...[
|
if (videoItem.history != null) ...[
|
||||||
Builder(builder: (context) {
|
Builder(builder: (context) {
|
||||||
@@ -140,7 +141,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
|||||||
: '${Utils.timeFormat(videoItem.history!['progress'])}/${Utils.timeFormat(videoItem.history!['duration'])}',
|
: '${Utils.timeFormat(videoItem.history!['progress'])}/${Utils.timeFormat(videoItem.history!['duration'])}',
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
);
|
);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return PBadge(
|
return PBadge(
|
||||||
@@ -148,7 +149,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
|||||||
Utils.timeFormat(videoItem.duration),
|
Utils.timeFormat(videoItem.duration),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -157,7 +158,7 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
|||||||
text: Utils.timeFormat(videoItem.duration),
|
text: Utils.timeFormat(videoItem.duration),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
import 'package:PiliPlus/common/widgets/video_popup_menu.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/home/rcmd/result.dart';
|
import 'package:PiliPlus/models/home/rcmd/result.dart';
|
||||||
import 'package:PiliPlus/models/model_rec_video_item.dart';
|
import 'package:PiliPlus/models/model_rec_video_item.dart';
|
||||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
@@ -127,8 +128,8 @@ class VideoCardV extends StatelessWidget {
|
|||||||
PBadge(
|
PBadge(
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
right: 7,
|
right: 7,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
text: Utils.timeFormat(videoItem.duration),
|
text: Utils.timeFormat(videoItem.duration),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -180,38 +181,38 @@ class VideoCardV extends StatelessWidget {
|
|||||||
if (videoItem.goto == 'bangumi') ...[
|
if (videoItem.goto == 'bangumi') ...[
|
||||||
PBadge(
|
PBadge(
|
||||||
text: videoItem.bangumiBadge,
|
text: videoItem.bangumiBadge,
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
type: 'line',
|
type: PBadgeType.line_primary,
|
||||||
fs: 9,
|
fontSize: 9,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
],
|
],
|
||||||
if (videoItem.rcmdReason != null) ...[
|
if (videoItem.rcmdReason != null) ...[
|
||||||
PBadge(
|
PBadge(
|
||||||
text: videoItem.rcmdReason,
|
text: videoItem.rcmdReason,
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
type: 'color',
|
type: PBadgeType.secondary,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
],
|
],
|
||||||
if (videoItem.goto == 'picture') ...[
|
if (videoItem.goto == 'picture') ...[
|
||||||
const PBadge(
|
const PBadge(
|
||||||
text: '动态',
|
text: '动态',
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
type: 'line',
|
type: PBadgeType.line_primary,
|
||||||
fs: 9,
|
fontSize: 9,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
],
|
],
|
||||||
if (videoItem.isFollowed) ...[
|
if (videoItem.isFollowed) ...[
|
||||||
const PBadge(
|
const PBadge(
|
||||||
text: '已关注',
|
text: '已关注',
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
type: 'color',
|
type: PBadgeType.secondary,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:PiliPlus/common/widgets/badge.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/space/item.dart';
|
import 'package:PiliPlus/models/space/item.dart';
|
||||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
import 'package:PiliPlus/utils/id_utils.dart';
|
import 'package:PiliPlus/utils/id_utils.dart';
|
||||||
@@ -85,8 +86,8 @@ class VideoCardVMemberHome extends StatelessWidget {
|
|||||||
PBadge(
|
PBadge(
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
right: 7,
|
right: 7,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
text: Utils.timeFormat(videoItem.duration),
|
text: Utils.timeFormat(videoItem.duration),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
6397
lib/grpc/bilibili/app/im/v1.pb.dart
Normal file
6397
lib/grpc/bilibili/app/im/v1.pb.dart
Normal file
File diff suppressed because it is too large
Load Diff
362
lib/grpc/bilibili/app/im/v1.pbenum.dart
Normal file
362
lib/grpc/bilibili/app/im/v1.pbenum.dart
Normal file
@@ -0,0 +1,362 @@
|
|||||||
|
//
|
||||||
|
// Generated code. Do not modify.
|
||||||
|
// source: bilibili/app/im/v1.proto
|
||||||
|
//
|
||||||
|
// @dart = 3.3
|
||||||
|
|
||||||
|
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||||
|
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||||
|
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||||
|
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||||
|
|
||||||
|
import 'dart:core' as $core;
|
||||||
|
|
||||||
|
import 'package:protobuf/protobuf.dart' as $pb;
|
||||||
|
|
||||||
|
class AirDropFrom extends $pb.ProtobufEnum {
|
||||||
|
static const AirDropFrom ADF_UNKNOWN = AirDropFrom._(0, _omitEnumNames ? '' : 'ADF_UNKNOWN');
|
||||||
|
static const AirDropFrom ADF_INSIDE_APP = AirDropFrom._(1, _omitEnumNames ? '' : 'ADF_INSIDE_APP');
|
||||||
|
static const AirDropFrom ADF_OUTSIDE_APP = AirDropFrom._(2, _omitEnumNames ? '' : 'ADF_OUTSIDE_APP');
|
||||||
|
|
||||||
|
static const $core.List<AirDropFrom> values = <AirDropFrom> [
|
||||||
|
ADF_UNKNOWN,
|
||||||
|
ADF_INSIDE_APP,
|
||||||
|
ADF_OUTSIDE_APP,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, AirDropFrom> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static AirDropFrom? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const AirDropFrom._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class AlertToastType extends $pb.ProtobufEnum {
|
||||||
|
static const AlertToastType ALERT_TOAST_TYPE_UNSPECIFIED = AlertToastType._(0, _omitEnumNames ? '' : 'ALERT_TOAST_TYPE_UNSPECIFIED');
|
||||||
|
static const AlertToastType ALERT_TOAST_TYPE_BANNED = AlertToastType._(1, _omitEnumNames ? '' : 'ALERT_TOAST_TYPE_BANNED');
|
||||||
|
static const AlertToastType ALERT_TOAST_TYPE_REPORT = AlertToastType._(2, _omitEnumNames ? '' : 'ALERT_TOAST_TYPE_REPORT');
|
||||||
|
|
||||||
|
static const $core.List<AlertToastType> values = <AlertToastType> [
|
||||||
|
ALERT_TOAST_TYPE_UNSPECIFIED,
|
||||||
|
ALERT_TOAST_TYPE_BANNED,
|
||||||
|
ALERT_TOAST_TYPE_REPORT,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, AlertToastType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static AlertToastType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const AlertToastType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class ContactTabType extends $pb.ProtobufEnum {
|
||||||
|
static const ContactTabType TAB_UNKNOWN = ContactTabType._(0, _omitEnumNames ? '' : 'TAB_UNKNOWN');
|
||||||
|
static const ContactTabType TAB_GROUP = ContactTabType._(1, _omitEnumNames ? '' : 'TAB_GROUP');
|
||||||
|
static const ContactTabType TAB_FOLLOW = ContactTabType._(2, _omitEnumNames ? '' : 'TAB_FOLLOW');
|
||||||
|
static const ContactTabType TAB_FANS = ContactTabType._(3, _omitEnumNames ? '' : 'TAB_FANS');
|
||||||
|
|
||||||
|
static const $core.List<ContactTabType> values = <ContactTabType> [
|
||||||
|
TAB_UNKNOWN,
|
||||||
|
TAB_GROUP,
|
||||||
|
TAB_FOLLOW,
|
||||||
|
TAB_FANS,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, ContactTabType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static ContactTabType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const ContactTabType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class IMSettingType extends $pb.ProtobufEnum {
|
||||||
|
static const IMSettingType SETTING_TYPE_NEED_ALL = IMSettingType._(0, _omitEnumNames ? '' : 'SETTING_TYPE_NEED_ALL');
|
||||||
|
static const IMSettingType SETTING_TYPE_REPLY_ME = IMSettingType._(1, _omitEnumNames ? '' : 'SETTING_TYPE_REPLY_ME');
|
||||||
|
static const IMSettingType SETTING_TYPE_NEW_FANS = IMSettingType._(2, _omitEnumNames ? '' : 'SETTING_TYPE_NEW_FANS');
|
||||||
|
static const IMSettingType SETTING_TYPE_RECEIVE_LIKE = IMSettingType._(3, _omitEnumNames ? '' : 'SETTING_TYPE_RECEIVE_LIKE');
|
||||||
|
static const IMSettingType SETTING_TYPE_MSG_REMIND = IMSettingType._(4, _omitEnumNames ? '' : 'SETTING_TYPE_MSG_REMIND');
|
||||||
|
static const IMSettingType SETTING_TYPE_MSG_INTERCEPTION = IMSettingType._(5, _omitEnumNames ? '' : 'SETTING_TYPE_MSG_INTERCEPTION');
|
||||||
|
static const IMSettingType SETTING_TYPE_FANS_GROUP_MSG = IMSettingType._(6, _omitEnumNames ? '' : 'SETTING_TYPE_FANS_GROUP_MSG');
|
||||||
|
static const IMSettingType SETTING_TYPE_FANS_GROUP_MSG_RECEIVE = IMSettingType._(7, _omitEnumNames ? '' : 'SETTING_TYPE_FANS_GROUP_MSG_RECEIVE');
|
||||||
|
static const IMSettingType SETTING_TYPE_FANS_GROUP_MSG_FOLD = IMSettingType._(8, _omitEnumNames ? '' : 'SETTING_TYPE_FANS_GROUP_MSG_FOLD');
|
||||||
|
static const IMSettingType SETTING_TYPE_FANS_GROUP_MSG_JOIN_GUIDE = IMSettingType._(9, _omitEnumNames ? '' : 'SETTING_TYPE_FANS_GROUP_MSG_JOIN_GUIDE');
|
||||||
|
static const IMSettingType SETTING_TYPE_UNFOLLOWED_MSG = IMSettingType._(10, _omitEnumNames ? '' : 'SETTING_TYPE_UNFOLLOWED_MSG');
|
||||||
|
static const IMSettingType SETTING_TYPE_UNFOLLOWED_MSG_FOLD = IMSettingType._(11, _omitEnumNames ? '' : 'SETTING_TYPE_UNFOLLOWED_MSG_FOLD');
|
||||||
|
static const IMSettingType SETTING_TYPE_BLACK_LIST = IMSettingType._(12, _omitEnumNames ? '' : 'SETTING_TYPE_BLACK_LIST');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT = IMSettingType._(13, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_SWITCH = IMSettingType._(14, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_SWITCH');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_OPEN_TIP_TEXT = IMSettingType._(15, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_OPEN_TIP_TEXT');
|
||||||
|
static const IMSettingType SETTING_TYPE_CLOSE_FANS_GROUP = IMSettingType._(16, _omitEnumNames ? '' : 'SETTING_TYPE_CLOSE_FANS_GROUP');
|
||||||
|
static const IMSettingType SETTING_TYPE_OLD_REPLY_ME = IMSettingType._(17, _omitEnumNames ? '' : 'SETTING_TYPE_OLD_REPLY_ME');
|
||||||
|
static const IMSettingType SETTING_TYPE_OLD_AT_ME = IMSettingType._(18, _omitEnumNames ? '' : 'SETTING_TYPE_OLD_AT_ME');
|
||||||
|
static const IMSettingType SETTING_TYPE_OLD_RECEIVE_LIKE = IMSettingType._(19, _omitEnumNames ? '' : 'SETTING_TYPE_OLD_RECEIVE_LIKE');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_INTERACT_LIMITS = IMSettingType._(20, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_INTERACT_LIMITS');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_DURATION = IMSettingType._(21, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_DURATION');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_COMMENT_LIMITS = IMSettingType._(22, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_COMMENT_LIMITS');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_DANMU_LIMITS = IMSettingType._(23, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_DANMU_LIMITS');
|
||||||
|
static const IMSettingType SETTING_TYPE_UNFOLLOWED_MSG_RECEIVE = IMSettingType._(24, _omitEnumNames ? '' : 'SETTING_TYPE_UNFOLLOWED_MSG_RECEIVE');
|
||||||
|
static const IMSettingType SETTING_TYPE_ANTI_HARASSMENT_IM_LIMITS = IMSettingType._(25, _omitEnumNames ? '' : 'SETTING_TYPE_ANTI_HARASSMENT_IM_LIMITS');
|
||||||
|
static const IMSettingType SETTING_TYPE_KEYWORD_BLOCKING = IMSettingType._(26, _omitEnumNames ? '' : 'SETTING_TYPE_KEYWORD_BLOCKING');
|
||||||
|
|
||||||
|
static const $core.List<IMSettingType> values = <IMSettingType> [
|
||||||
|
SETTING_TYPE_NEED_ALL,
|
||||||
|
SETTING_TYPE_REPLY_ME,
|
||||||
|
SETTING_TYPE_NEW_FANS,
|
||||||
|
SETTING_TYPE_RECEIVE_LIKE,
|
||||||
|
SETTING_TYPE_MSG_REMIND,
|
||||||
|
SETTING_TYPE_MSG_INTERCEPTION,
|
||||||
|
SETTING_TYPE_FANS_GROUP_MSG,
|
||||||
|
SETTING_TYPE_FANS_GROUP_MSG_RECEIVE,
|
||||||
|
SETTING_TYPE_FANS_GROUP_MSG_FOLD,
|
||||||
|
SETTING_TYPE_FANS_GROUP_MSG_JOIN_GUIDE,
|
||||||
|
SETTING_TYPE_UNFOLLOWED_MSG,
|
||||||
|
SETTING_TYPE_UNFOLLOWED_MSG_FOLD,
|
||||||
|
SETTING_TYPE_BLACK_LIST,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_SWITCH,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_OPEN_TIP_TEXT,
|
||||||
|
SETTING_TYPE_CLOSE_FANS_GROUP,
|
||||||
|
SETTING_TYPE_OLD_REPLY_ME,
|
||||||
|
SETTING_TYPE_OLD_AT_ME,
|
||||||
|
SETTING_TYPE_OLD_RECEIVE_LIKE,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_INTERACT_LIMITS,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_DURATION,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_COMMENT_LIMITS,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_DANMU_LIMITS,
|
||||||
|
SETTING_TYPE_UNFOLLOWED_MSG_RECEIVE,
|
||||||
|
SETTING_TYPE_ANTI_HARASSMENT_IM_LIMITS,
|
||||||
|
SETTING_TYPE_KEYWORD_BLOCKING,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, IMSettingType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static IMSettingType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const IMSettingType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class LabelType extends $pb.ProtobufEnum {
|
||||||
|
static const LabelType LABEL_TYPE_DEFAULT = LabelType._(0, _omitEnumNames ? '' : 'LABEL_TYPE_DEFAULT');
|
||||||
|
static const LabelType LABEL_TYPE_HUA_HUO = LabelType._(1, _omitEnumNames ? '' : 'LABEL_TYPE_HUA_HUO');
|
||||||
|
static const LabelType LABEL_TYPE_ORIGINAL_FANS = LabelType._(2, _omitEnumNames ? '' : 'LABEL_TYPE_ORIGINAL_FANS');
|
||||||
|
static const LabelType LABEL_TYPE_SPECIAL_ATTENTION = LabelType._(3, _omitEnumNames ? '' : 'LABEL_TYPE_SPECIAL_ATTENTION');
|
||||||
|
static const LabelType LABEL_TYPE_CONTRACT_UP = LabelType._(4, _omitEnumNames ? '' : 'LABEL_TYPE_CONTRACT_UP');
|
||||||
|
static const LabelType LABEL_TYPE_OLD_FANS = LabelType._(5, _omitEnumNames ? '' : 'LABEL_TYPE_OLD_FANS');
|
||||||
|
static const LabelType LABEL_TYPE_SPECIAL_ATTENTION_2 = LabelType._(6, _omitEnumNames ? '' : 'LABEL_TYPE_SPECIAL_ATTENTION_2');
|
||||||
|
static const LabelType LABEL_TYPE_FANS_MEDAL = LabelType._(7, _omitEnumNames ? '' : 'LABEL_TYPE_FANS_MEDAL');
|
||||||
|
static const LabelType LABEL_TYPE_GUARD_MEDAL = LabelType._(8, _omitEnumNames ? '' : 'LABEL_TYPE_GUARD_MEDAL');
|
||||||
|
|
||||||
|
static const $core.List<LabelType> values = <LabelType> [
|
||||||
|
LABEL_TYPE_DEFAULT,
|
||||||
|
LABEL_TYPE_HUA_HUO,
|
||||||
|
LABEL_TYPE_ORIGINAL_FANS,
|
||||||
|
LABEL_TYPE_SPECIAL_ATTENTION,
|
||||||
|
LABEL_TYPE_CONTRACT_UP,
|
||||||
|
LABEL_TYPE_OLD_FANS,
|
||||||
|
LABEL_TYPE_SPECIAL_ATTENTION_2,
|
||||||
|
LABEL_TYPE_FANS_MEDAL,
|
||||||
|
LABEL_TYPE_GUARD_MEDAL,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, LabelType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static LabelType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const LabelType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class MsgSummaryPrefixType extends $pb.ProtobufEnum {
|
||||||
|
static const MsgSummaryPrefixType MSG_SUMMARY_PREFIX_TYPE_NONE = MsgSummaryPrefixType._(0, _omitEnumNames ? '' : 'MSG_SUMMARY_PREFIX_TYPE_NONE');
|
||||||
|
static const MsgSummaryPrefixType MSG_SUMMARY_PREFIX_TYPE_NOTIFICATION = MsgSummaryPrefixType._(1, _omitEnumNames ? '' : 'MSG_SUMMARY_PREFIX_TYPE_NOTIFICATION');
|
||||||
|
static const MsgSummaryPrefixType MSG_SUMMARY_PREFIX_TYPE_GROUP_BLOCKED = MsgSummaryPrefixType._(2, _omitEnumNames ? '' : 'MSG_SUMMARY_PREFIX_TYPE_GROUP_BLOCKED');
|
||||||
|
static const MsgSummaryPrefixType MSG_SUMMARY_PREFIX_TYPE_MENTIONED = MsgSummaryPrefixType._(3, _omitEnumNames ? '' : 'MSG_SUMMARY_PREFIX_TYPE_MENTIONED');
|
||||||
|
static const MsgSummaryPrefixType MSG_SUMMARY_PREFIX_TYPE_UNREAD = MsgSummaryPrefixType._(4, _omitEnumNames ? '' : 'MSG_SUMMARY_PREFIX_TYPE_UNREAD');
|
||||||
|
|
||||||
|
static const $core.List<MsgSummaryPrefixType> values = <MsgSummaryPrefixType> [
|
||||||
|
MSG_SUMMARY_PREFIX_TYPE_NONE,
|
||||||
|
MSG_SUMMARY_PREFIX_TYPE_NOTIFICATION,
|
||||||
|
MSG_SUMMARY_PREFIX_TYPE_GROUP_BLOCKED,
|
||||||
|
MSG_SUMMARY_PREFIX_TYPE_MENTIONED,
|
||||||
|
MSG_SUMMARY_PREFIX_TYPE_UNREAD,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, MsgSummaryPrefixType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static MsgSummaryPrefixType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const MsgSummaryPrefixType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class QuickLinkItemType extends $pb.ProtobufEnum {
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_UNKNOWN = QuickLinkItemType._(0, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_UNKNOWN');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_OLD_LIKE = QuickLinkItemType._(1, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_OLD_LIKE');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_OLD_REPLY = QuickLinkItemType._(2, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_OLD_REPLY');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_AT = QuickLinkItemType._(3, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_AT');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_SYSTEM = QuickLinkItemType._(4, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_SYSTEM');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_HUA_HUO = QuickLinkItemType._(5, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_HUA_HUO');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_FOLLOW = QuickLinkItemType._(6, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_FOLLOW');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_REPLY = QuickLinkItemType._(100, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_REPLY');
|
||||||
|
static const QuickLinkItemType QUICK_LINK_ITEM_TYPE_LIKE = QuickLinkItemType._(101, _omitEnumNames ? '' : 'QUICK_LINK_ITEM_TYPE_LIKE');
|
||||||
|
|
||||||
|
static const $core.List<QuickLinkItemType> values = <QuickLinkItemType> [
|
||||||
|
QUICK_LINK_ITEM_TYPE_UNKNOWN,
|
||||||
|
QUICK_LINK_ITEM_TYPE_OLD_LIKE,
|
||||||
|
QUICK_LINK_ITEM_TYPE_OLD_REPLY,
|
||||||
|
QUICK_LINK_ITEM_TYPE_AT,
|
||||||
|
QUICK_LINK_ITEM_TYPE_SYSTEM,
|
||||||
|
QUICK_LINK_ITEM_TYPE_HUA_HUO,
|
||||||
|
QUICK_LINK_ITEM_TYPE_FOLLOW,
|
||||||
|
QUICK_LINK_ITEM_TYPE_REPLY,
|
||||||
|
QUICK_LINK_ITEM_TYPE_LIKE,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, QuickLinkItemType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static QuickLinkItemType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const QuickLinkItemType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class QuickLinkMsgType extends $pb.ProtobufEnum {
|
||||||
|
static const QuickLinkMsgType LikeMsg = QuickLinkMsgType._(0, _omitEnumNames ? '' : 'LikeMsg');
|
||||||
|
static const QuickLinkMsgType ReplyMsg = QuickLinkMsgType._(1, _omitEnumNames ? '' : 'ReplyMsg');
|
||||||
|
static const QuickLinkMsgType AtMsg = QuickLinkMsgType._(2, _omitEnumNames ? '' : 'AtMsg');
|
||||||
|
static const QuickLinkMsgType DanmuMsg = QuickLinkMsgType._(3, _omitEnumNames ? '' : 'DanmuMsg');
|
||||||
|
static const QuickLinkMsgType CoinMsg = QuickLinkMsgType._(4, _omitEnumNames ? '' : 'CoinMsg');
|
||||||
|
static const QuickLinkMsgType FavoriteMsg = QuickLinkMsgType._(5, _omitEnumNames ? '' : 'FavoriteMsg');
|
||||||
|
|
||||||
|
static const $core.List<QuickLinkMsgType> values = <QuickLinkMsgType> [
|
||||||
|
LikeMsg,
|
||||||
|
ReplyMsg,
|
||||||
|
AtMsg,
|
||||||
|
DanmuMsg,
|
||||||
|
CoinMsg,
|
||||||
|
FavoriteMsg,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, QuickLinkMsgType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static QuickLinkMsgType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const QuickLinkMsgType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SessionFilterType extends $pb.ProtobufEnum {
|
||||||
|
static const SessionFilterType FILTER_DEFAULT = SessionFilterType._(0, _omitEnumNames ? '' : 'FILTER_DEFAULT');
|
||||||
|
static const SessionFilterType FILTER_FOLLOW = SessionFilterType._(1, _omitEnumNames ? '' : 'FILTER_FOLLOW');
|
||||||
|
|
||||||
|
static const $core.List<SessionFilterType> values = <SessionFilterType> [
|
||||||
|
FILTER_DEFAULT,
|
||||||
|
FILTER_FOLLOW,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, SessionFilterType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static SessionFilterType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const SessionFilterType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SessionPageType extends $pb.ProtobufEnum {
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_UNKNOWN = SessionPageType._(0, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_UNKNOWN');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_HOME = SessionPageType._(1, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_HOME');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_UNFOLLOWED = SessionPageType._(2, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_UNFOLLOWED');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_STRANGER = SessionPageType._(3, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_STRANGER');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_DUSTBIN = SessionPageType._(4, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_DUSTBIN');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_GROUP = SessionPageType._(5, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_GROUP');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_HUA_HUO = SessionPageType._(6, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_HUA_HUO');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_AI = SessionPageType._(7, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_AI');
|
||||||
|
static const SessionPageType SESSION_PAGE_TYPE_CUSTOMER = SessionPageType._(8, _omitEnumNames ? '' : 'SESSION_PAGE_TYPE_CUSTOMER');
|
||||||
|
|
||||||
|
static const $core.List<SessionPageType> values = <SessionPageType> [
|
||||||
|
SESSION_PAGE_TYPE_UNKNOWN,
|
||||||
|
SESSION_PAGE_TYPE_HOME,
|
||||||
|
SESSION_PAGE_TYPE_UNFOLLOWED,
|
||||||
|
SESSION_PAGE_TYPE_STRANGER,
|
||||||
|
SESSION_PAGE_TYPE_DUSTBIN,
|
||||||
|
SESSION_PAGE_TYPE_GROUP,
|
||||||
|
SESSION_PAGE_TYPE_HUA_HUO,
|
||||||
|
SESSION_PAGE_TYPE_AI,
|
||||||
|
SESSION_PAGE_TYPE_CUSTOMER,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, SessionPageType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static SessionPageType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const SessionPageType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SessionType extends $pb.ProtobufEnum {
|
||||||
|
static const SessionType SESSION_TYPE_UNKNOWN = SessionType._(0, _omitEnumNames ? '' : 'SESSION_TYPE_UNKNOWN');
|
||||||
|
static const SessionType SESSION_TYPE_PRIVATE = SessionType._(1, _omitEnumNames ? '' : 'SESSION_TYPE_PRIVATE');
|
||||||
|
static const SessionType SESSION_TYPE_GROUP = SessionType._(2, _omitEnumNames ? '' : 'SESSION_TYPE_GROUP');
|
||||||
|
static const SessionType SESSION_TYPE_GROUP_FOLD = SessionType._(3, _omitEnumNames ? '' : 'SESSION_TYPE_GROUP_FOLD');
|
||||||
|
static const SessionType SESSION_TYPE_UNFOLLOWED = SessionType._(4, _omitEnumNames ? '' : 'SESSION_TYPE_UNFOLLOWED');
|
||||||
|
static const SessionType SESSION_TYPE_STRANGER = SessionType._(5, _omitEnumNames ? '' : 'SESSION_TYPE_STRANGER');
|
||||||
|
static const SessionType SESSION_TYPE_DUSTBIN = SessionType._(6, _omitEnumNames ? '' : 'SESSION_TYPE_DUSTBIN');
|
||||||
|
static const SessionType SESSION_TYPE_CUSTOMER_FOLD = SessionType._(7, _omitEnumNames ? '' : 'SESSION_TYPE_CUSTOMER_FOLD');
|
||||||
|
static const SessionType SESSION_TYPE_SYSTEM = SessionType._(8, _omitEnumNames ? '' : 'SESSION_TYPE_SYSTEM');
|
||||||
|
static const SessionType SESSION_TYPE_AI_FOLD = SessionType._(9, _omitEnumNames ? '' : 'SESSION_TYPE_AI_FOLD');
|
||||||
|
static const SessionType SESSION_TYPE_CUSTOMER_ACCOUNT = SessionType._(10, _omitEnumNames ? '' : 'SESSION_TYPE_CUSTOMER_ACCOUNT');
|
||||||
|
|
||||||
|
static const $core.List<SessionType> values = <SessionType> [
|
||||||
|
SESSION_TYPE_UNKNOWN,
|
||||||
|
SESSION_TYPE_PRIVATE,
|
||||||
|
SESSION_TYPE_GROUP,
|
||||||
|
SESSION_TYPE_GROUP_FOLD,
|
||||||
|
SESSION_TYPE_UNFOLLOWED,
|
||||||
|
SESSION_TYPE_STRANGER,
|
||||||
|
SESSION_TYPE_DUSTBIN,
|
||||||
|
SESSION_TYPE_CUSTOMER_FOLD,
|
||||||
|
SESSION_TYPE_SYSTEM,
|
||||||
|
SESSION_TYPE_AI_FOLD,
|
||||||
|
SESSION_TYPE_CUSTOMER_ACCOUNT,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, SessionType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static SessionType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const SessionType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class ThreeDotItemType extends $pb.ProtobufEnum {
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_UNKNOWN = ThreeDotItemType._(0, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_UNKNOWN');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_READ_ALL = ThreeDotItemType._(1, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_READ_ALL');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_MSG_SETTING = ThreeDotItemType._(2, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_MSG_SETTING');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_AUTO_REPLY = ThreeDotItemType._(3, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_AUTO_REPLY');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_UP_HELPER = ThreeDotItemType._(4, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_UP_HELPER');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_LIVE_HELPER = ThreeDotItemType._(5, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_LIVE_HELPER');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_FANS_GROUP_HELPER = ThreeDotItemType._(6, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_FANS_GROUP_HELPER');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_CONTRIBUTION_PUSH = ThreeDotItemType._(7, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_CONTRIBUTION_PUSH');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_CONTACTS = ThreeDotItemType._(8, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_CONTACTS');
|
||||||
|
static const ThreeDotItemType THREE_DOT_ITEM_TYPE_CLEAR_LIST = ThreeDotItemType._(9, _omitEnumNames ? '' : 'THREE_DOT_ITEM_TYPE_CLEAR_LIST');
|
||||||
|
|
||||||
|
static const $core.List<ThreeDotItemType> values = <ThreeDotItemType> [
|
||||||
|
THREE_DOT_ITEM_TYPE_UNKNOWN,
|
||||||
|
THREE_DOT_ITEM_TYPE_READ_ALL,
|
||||||
|
THREE_DOT_ITEM_TYPE_MSG_SETTING,
|
||||||
|
THREE_DOT_ITEM_TYPE_AUTO_REPLY,
|
||||||
|
THREE_DOT_ITEM_TYPE_UP_HELPER,
|
||||||
|
THREE_DOT_ITEM_TYPE_LIVE_HELPER,
|
||||||
|
THREE_DOT_ITEM_TYPE_FANS_GROUP_HELPER,
|
||||||
|
THREE_DOT_ITEM_TYPE_CONTRIBUTION_PUSH,
|
||||||
|
THREE_DOT_ITEM_TYPE_CONTACTS,
|
||||||
|
THREE_DOT_ITEM_TYPE_CLEAR_LIST,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, ThreeDotItemType> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static ThreeDotItemType? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const ThreeDotItemType._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
class UnreadStyle extends $pb.ProtobufEnum {
|
||||||
|
static const UnreadStyle UNREAD_STYLE_NONE = UnreadStyle._(0, _omitEnumNames ? '' : 'UNREAD_STYLE_NONE');
|
||||||
|
static const UnreadStyle UNREAD_STYLE_DOT = UnreadStyle._(1, _omitEnumNames ? '' : 'UNREAD_STYLE_DOT');
|
||||||
|
static const UnreadStyle UNREAD_STYLE_NUMBER = UnreadStyle._(2, _omitEnumNames ? '' : 'UNREAD_STYLE_NUMBER');
|
||||||
|
|
||||||
|
static const $core.List<UnreadStyle> values = <UnreadStyle> [
|
||||||
|
UNREAD_STYLE_NONE,
|
||||||
|
UNREAD_STYLE_DOT,
|
||||||
|
UNREAD_STYLE_NUMBER,
|
||||||
|
];
|
||||||
|
|
||||||
|
static final $core.Map<$core.int, UnreadStyle> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||||
|
static UnreadStyle? valueOf($core.int value) => _byValue[value];
|
||||||
|
|
||||||
|
const UnreadStyle._(super.v, super.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
|
||||||
1757
lib/grpc/bilibili/app/im/v1.pbjson.dart
Normal file
1757
lib/grpc/bilibili/app/im/v1.pbjson.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@ import 'dart:typed_data';
|
|||||||
|
|
||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/grpc/bilibili/app/dynamic/v1.pb.dart';
|
import 'package:PiliPlus/grpc/bilibili/app/dynamic/v1.pb.dart';
|
||||||
|
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart';
|
||||||
import 'package:PiliPlus/grpc/bilibili/community/service/dm/v1.pb.dart';
|
import 'package:PiliPlus/grpc/bilibili/community/service/dm/v1.pb.dart';
|
||||||
import 'package:PiliPlus/grpc/bilibili/im/interfaces/v1.pb.dart';
|
import 'package:PiliPlus/grpc/bilibili/im/interfaces/v1.pb.dart';
|
||||||
import 'package:PiliPlus/grpc/bilibili/im/type.pb.dart';
|
import 'package:PiliPlus/grpc/bilibili/im/type.pb.dart';
|
||||||
@@ -22,7 +23,7 @@ import 'package:PiliPlus/utils/utils.dart';
|
|||||||
import 'package:archive/archive.dart';
|
import 'package:archive/archive.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:fixnum/fixnum.dart';
|
import 'package:fixnum/fixnum.dart';
|
||||||
import 'package:protobuf/protobuf.dart' show GeneratedMessage;
|
import 'package:protobuf/protobuf.dart' show GeneratedMessage, PbMap;
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
class GrpcUrl {
|
class GrpcUrl {
|
||||||
@@ -46,8 +47,10 @@ class GrpcUrl {
|
|||||||
|
|
||||||
// im
|
// im
|
||||||
static const im = '/bilibili.im.interface.v1.ImInterface';
|
static const im = '/bilibili.im.interface.v1.ImInterface';
|
||||||
|
static const im2 = '/bilibili.app.im.v1.im';
|
||||||
static const sendMsg = '$im/SendMsg';
|
static const sendMsg = '$im/SendMsg';
|
||||||
static const shareList = '$im/ShareList';
|
static const shareList = '$im/ShareList';
|
||||||
|
static const sessionMain = '$im2/SessionMain';
|
||||||
}
|
}
|
||||||
|
|
||||||
class GrpcRepo {
|
class GrpcRepo {
|
||||||
@@ -369,4 +372,14 @@ class GrpcRepo {
|
|||||||
RspShareList.fromBuffer,
|
RspShareList.fromBuffer,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future sessionMain({PbMap<int, Offset>? offset}) async {
|
||||||
|
return await _request(
|
||||||
|
GrpcUrl.sessionMain,
|
||||||
|
SessionMainReq(
|
||||||
|
paginationParams: PaginationParams(offsets: offset),
|
||||||
|
),
|
||||||
|
SessionMainReply.fromBuffer,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart';
|
||||||
|
import 'package:PiliPlus/grpc/grpc_repo.dart';
|
||||||
import 'package:PiliPlus/http/api.dart';
|
import 'package:PiliPlus/http/api.dart';
|
||||||
import 'package:PiliPlus/http/constants.dart';
|
import 'package:PiliPlus/http/constants.dart';
|
||||||
import 'package:PiliPlus/http/init.dart';
|
import 'package:PiliPlus/http/init.dart';
|
||||||
@@ -15,6 +17,7 @@ import 'package:PiliPlus/utils/storage.dart';
|
|||||||
import 'package:PiliPlus/utils/wbi_sign.dart';
|
import 'package:PiliPlus/utils/wbi_sign.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:protobuf/protobuf.dart' show PbMap;
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
class MsgHttp {
|
class MsgHttp {
|
||||||
@@ -430,6 +433,16 @@ class MsgHttp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future<LoadingState<SessionMainReply>> sessionMain(
|
||||||
|
{PbMap<int, Offset>? offset}) async {
|
||||||
|
final res = await GrpcRepo.sessionMain(offset: offset);
|
||||||
|
if (res['status']) {
|
||||||
|
return LoadingState.success(res['data']);
|
||||||
|
} else {
|
||||||
|
return LoadingState.error(res['msg']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Future accountList(uids) async {
|
static Future accountList(uids) async {
|
||||||
var res = await Request().get(Api.sessionAccountList, queryParameters: {
|
var res = await Request().get(Api.sessionAccountList, queryParameters: {
|
||||||
'uids': uids,
|
'uids': uids,
|
||||||
|
|||||||
12
lib/models/common/badge_type.dart
Normal file
12
lib/models/common/badge_type.dart
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
|
||||||
|
enum PBadgeType {
|
||||||
|
primary,
|
||||||
|
secondary,
|
||||||
|
gray,
|
||||||
|
error,
|
||||||
|
line_primary,
|
||||||
|
line_secondary,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PBadgeSize { medium, small }
|
||||||
@@ -8,6 +8,7 @@ import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
|||||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||||
show ReplyInfo;
|
show ReplyInfo;
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/common/image_preview_type.dart';
|
import 'package:PiliPlus/models/common/image_preview_type.dart';
|
||||||
import 'package:PiliPlus/models/common/reply/reply_sort_type.dart';
|
import 'package:PiliPlus/models/common/reply/reply_sort_type.dart';
|
||||||
import 'package:PiliPlus/models/common/reply/reply_type.dart';
|
import 'package:PiliPlus/models/common/reply/reply_type.dart';
|
||||||
@@ -454,7 +455,7 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
() => PBadge(
|
() => PBadge(
|
||||||
top: 12,
|
top: 12,
|
||||||
right: paddingRight,
|
right: paddingRight,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
text:
|
text:
|
||||||
'${_articleCtr.topIndex.value + 1}/$length'),
|
'${_articleCtr.topIndex.value + 1}/$length'),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -61,7 +62,7 @@ class BangumiCardV extends StatelessWidget {
|
|||||||
text: bangumiItem.renewalTime,
|
text: bangumiItem.renewalTime,
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
left: 6,
|
left: 6,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
)
|
)
|
||||||
else if (bangumiItem.order != null)
|
else if (bangumiItem.order != null)
|
||||||
PBadge(
|
PBadge(
|
||||||
@@ -70,7 +71,7 @@ class BangumiCardV extends StatelessWidget {
|
|||||||
right: null,
|
right: null,
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
left: 6,
|
left: 6,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ class BangumiCardVPgcIndex extends StatelessWidget {
|
|||||||
right: null,
|
right: null,
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
left: 6,
|
left: 6,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/widgets/badge.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/models/bangumi/pgc_timeline/episode.dart';
|
import 'package:PiliPlus/models/bangumi/pgc_timeline/episode.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -53,7 +54,7 @@ class BangumiCardVTimeline extends StatelessWidget {
|
|||||||
text: '${item.pubTime}',
|
text: '${item.pubTime}',
|
||||||
left: 6,
|
left: 6,
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||||
import 'package:PiliPlus/pages/dynamics/widgets/rich_node_panel.dart';
|
import 'package:PiliPlus/pages/dynamics/widgets/rich_node_panel.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
@@ -92,7 +93,7 @@ Widget liveRcmdPanel(
|
|||||||
text: watchedShow?['text_large'],
|
text: watchedShow?['text_large'],
|
||||||
top: 6,
|
top: 6,
|
||||||
right: 56,
|
right: 56,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
PBadge(
|
PBadge(
|
||||||
text: liveStatus == 1 ? '直播中' : '直播结束',
|
text: liveStatus == 1 ? '直播中' : '直播结束',
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||||
import 'package:PiliPlus/pages/dynamics/widgets/rich_node_panel.dart';
|
import 'package:PiliPlus/pages/dynamics/widgets/rich_node_panel.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
@@ -77,7 +78,9 @@ Widget videoSeasonWidget(
|
|||||||
right: 10.0,
|
right: 10.0,
|
||||||
bottom: null,
|
bottom: null,
|
||||||
left: null,
|
left: null,
|
||||||
type: content.badge!['text'] == '充电专属' ? 'error' : 'primary',
|
type: content.badge!['text'] == '充电专属'
|
||||||
|
? PBadgeType.error
|
||||||
|
: PBadgeType.primary,
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
|||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/http/video.dart';
|
import 'package:PiliPlus/http/video.dart';
|
||||||
import 'package:PiliPlus/models/bangumi/info.dart' as bangumi;
|
import 'package:PiliPlus/models/bangumi/info.dart' as bangumi;
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/common/episode_panel_type.dart';
|
import 'package:PiliPlus/models/common/episode_panel_type.dart';
|
||||||
import 'package:PiliPlus/models/video_detail_res.dart' as video;
|
import 'package:PiliPlus/models/video_detail_res.dart' as video;
|
||||||
import 'package:PiliPlus/pages/common/common_slide_page.dart';
|
import 'package:PiliPlus/pages/common/common_slide_page.dart';
|
||||||
@@ -428,7 +429,7 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel>
|
|||||||
text: Utils.timeFormat(duration),
|
text: Utils.timeFormat(duration),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class FavPgcItem extends StatelessWidget {
|
|||||||
right: 4,
|
right: 4,
|
||||||
top: 4,
|
top: 4,
|
||||||
text: item.badge,
|
text: item.badge,
|
||||||
fs: 10,
|
fontSize: 10,
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 2,
|
horizontal: 2,
|
||||||
vertical: 1,
|
vertical: 1,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
import 'package:PiliPlus/http/video.dart';
|
import 'package:PiliPlus/http/video.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/user/fav_detail.dart';
|
import 'package:PiliPlus/models/user/fav_detail.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:PiliPlus/utils/id_utils.dart';
|
import 'package:PiliPlus/utils/id_utils.dart';
|
||||||
@@ -107,7 +108,7 @@ class FavVideoCardH extends StatelessWidget {
|
|||||||
text: Utils.timeFormat(videoItem.duration),
|
text: Utils.timeFormat(videoItem.duration),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
PBadge(
|
PBadge(
|
||||||
text: videoItem.ogv?['type_name'],
|
text: videoItem.ogv?['type_name'],
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/progress_bar/video_progress_indicator.da
|
|||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
import 'package:PiliPlus/http/user.dart';
|
import 'package:PiliPlus/http/user.dart';
|
||||||
import 'package:PiliPlus/http/video.dart';
|
import 'package:PiliPlus/http/video.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/common/history_business_type.dart';
|
import 'package:PiliPlus/models/common/history_business_type.dart';
|
||||||
import 'package:PiliPlus/models/user/history.dart';
|
import 'package:PiliPlus/models/user/history.dart';
|
||||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||||
@@ -153,7 +154,7 @@ class HistoryItem extends StatelessWidget {
|
|||||||
: '${Utils.timeFormat(videoItem.progress)}/${Utils.timeFormat(videoItem.duration!)}',
|
: '${Utils.timeFormat(videoItem.progress)}/${Utils.timeFormat(videoItem.duration!)}',
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 8.0,
|
bottom: 8.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
// 右上角
|
// 右上角
|
||||||
if (HistoryBusinessType.showBadge
|
if (HistoryBusinessType.showBadge
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/member/coin.dart';
|
import 'package:PiliPlus/models/member/coin.dart';
|
||||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
@@ -67,7 +68,7 @@ class MemberCoinsItem extends StatelessWidget {
|
|||||||
PBadge(
|
PBadge(
|
||||||
bottom: 6,
|
bottom: 6,
|
||||||
right: 6,
|
right: 6,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
text: Utils.timeFormat(coinItem.duration),
|
text: Utils.timeFormat(coinItem.duration),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/constants.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/space_fav/list.dart';
|
import 'package:PiliPlus/models/space_fav/list.dart';
|
||||||
import 'package:PiliPlus/models/user/sub_folder.dart';
|
import 'package:PiliPlus/models/user/sub_folder.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
@@ -89,8 +90,8 @@ class MemberFavItem extends StatelessWidget {
|
|||||||
right: 3,
|
right: 3,
|
||||||
bottom: 3,
|
bottom: 3,
|
||||||
text: '合集',
|
text: '合集',
|
||||||
bold: false,
|
isBold: false,
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
)
|
)
|
||||||
else if (item.type == 0 || item.type == 11)
|
else if (item.type == 0 || item.type == 11)
|
||||||
Positioned(
|
Positioned(
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/common/search_type.dart';
|
import 'package:PiliPlus/models/common/search_type.dart';
|
||||||
import 'package:PiliPlus/models/user/sub_detail.dart';
|
import 'package:PiliPlus/models/user/sub_detail.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
@@ -68,7 +69,7 @@ class SubVideoCardH extends StatelessWidget {
|
|||||||
text: Utils.timeFormat(videoItem.duration!),
|
text: Utils.timeFormat(videoItem.duration!),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/models/video/later.dart';
|
import 'package:PiliPlus/models/video/later.dart';
|
||||||
import 'package:PiliPlus/pages/common/common_collapse_slide_page.dart';
|
import 'package:PiliPlus/pages/common/common_collapse_slide_page.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
@@ -206,7 +207,7 @@ class _MediaListPanelState
|
|||||||
text: Utils.timeFormat(item.duration!),
|
text: Utils.timeFormat(item.duration!),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 6.0,
|
||||||
type: 'gray',
|
type: PBadgeType.gray,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
|||||||
show ReplyInfo, ReplyControl, Content;
|
show ReplyInfo, ReplyControl, Content;
|
||||||
import 'package:PiliPlus/http/init.dart';
|
import 'package:PiliPlus/http/init.dart';
|
||||||
import 'package:PiliPlus/http/video.dart';
|
import 'package:PiliPlus/http/video.dart';
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
import 'package:PiliPlus/pages/dynamics/widgets/vote.dart';
|
import 'package:PiliPlus/pages/dynamics/widgets/vote.dart';
|
||||||
import 'package:PiliPlus/pages/save_panel/view.dart';
|
import 'package:PiliPlus/pages/save_panel/view.dart';
|
||||||
import 'package:PiliPlus/pages/video/controller.dart';
|
import 'package:PiliPlus/pages/video/controller.dart';
|
||||||
@@ -219,9 +220,9 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
if (replyItem.mid == upMid)
|
if (replyItem.mid == upMid)
|
||||||
const PBadge(
|
const PBadge(
|
||||||
text: 'UP',
|
text: 'UP',
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
fs: 9,
|
fontSize: 9,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -290,11 +291,10 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
alignment: PlaceholderAlignment.top,
|
alignment: PlaceholderAlignment.top,
|
||||||
child: PBadge(
|
child: PBadge(
|
||||||
text: 'TOP',
|
text: 'TOP',
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
type: 'line',
|
type: PBadgeType.line_primary,
|
||||||
fs: 9,
|
fontSize: 9,
|
||||||
semanticsLabel: '置顶',
|
|
||||||
textScaleFactor: 1,
|
textScaleFactor: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -503,9 +503,9 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: PBadge(
|
child: PBadge(
|
||||||
text: 'UP',
|
text: 'UP',
|
||||||
size: 'small',
|
size: PBadgeSize.small,
|
||||||
stack: 'normal',
|
isStack: false,
|
||||||
fs: 9,
|
fontSize: 9,
|
||||||
textScaleFactor: 1,
|
textScaleFactor: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
|
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/http/msg.dart';
|
import 'package:PiliPlus/http/msg.dart';
|
||||||
import 'package:PiliPlus/models/msg/account.dart';
|
|
||||||
import 'package:PiliPlus/models/msg/msgfeed_unread.dart';
|
import 'package:PiliPlus/models/msg/msgfeed_unread.dart';
|
||||||
import 'package:PiliPlus/models/msg/session.dart';
|
|
||||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
|
||||||
import 'package:PiliPlus/utils/storage.dart';
|
import 'package:PiliPlus/utils/storage.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:protobuf/protobuf.dart' show PbMap;
|
||||||
|
|
||||||
class WhisperController
|
class WhisperController
|
||||||
extends CommonListController<List<SessionList>?, SessionList> {
|
extends CommonListController<SessionMainReply, Session> {
|
||||||
late final List msgFeedTopItems;
|
late final List msgFeedTopItems;
|
||||||
late final RxList<int> unreadCounts;
|
late final RxList<int> unreadCounts;
|
||||||
|
|
||||||
int? endTs;
|
PbMap<int, Offset>? offset;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
@@ -65,37 +64,20 @@ class WhisperController
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<LoadingState<List<SessionList>?>> customGetData() =>
|
List<Session>? getDataList(SessionMainReply response) {
|
||||||
MsgHttp.sessionList(endTs: endTs);
|
offset = response.paginationParams.offsets;
|
||||||
|
isEnd = !response.paginationParams.hasMore;
|
||||||
|
return response.sessions;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool customHandleResponse(
|
Future<LoadingState<SessionMainReply>> customGetData() =>
|
||||||
bool isRefresh, Success<List<SessionList>?> response) {
|
MsgHttp.sessionMain(offset: offset);
|
||||||
endTs = response.response?.lastOrNull?.sessionTs;
|
|
||||||
List<SessionList>? dataList = response.response;
|
|
||||||
if (dataList.isNullOrEmpty) {
|
|
||||||
isEnd = true;
|
|
||||||
if (isRefresh) {
|
|
||||||
loadingState.value = LoadingState<List<SessionList>?>.success(dataList);
|
|
||||||
}
|
|
||||||
isLoading = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
queryAccountList(dataList!).then((_) {
|
|
||||||
if (isRefresh) {
|
|
||||||
loadingState.value = LoadingState<List<SessionList>?>.success(dataList);
|
|
||||||
} else if (loadingState.value is Success) {
|
|
||||||
loadingState.value.data!.addAll(dataList);
|
|
||||||
loadingState.refresh();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onRefresh() {
|
Future<void> onRefresh() {
|
||||||
|
offset = null;
|
||||||
queryMsgFeedUnread();
|
queryMsgFeedUnread();
|
||||||
endTs = null;
|
|
||||||
return super.onRefresh();
|
return super.onRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,11 +98,10 @@ class WhisperController
|
|||||||
opType: isTop ? 1 : 0,
|
opType: isTop ? 1 : 0,
|
||||||
);
|
);
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
List<SessionList> list = (loadingState.value as Success).response;
|
List<Session> list = (loadingState.value as Success).response;
|
||||||
list[index].topTs = isTop ? 0 : 1;
|
list[index].isPinned = isTop ? false : true;
|
||||||
if (!isTop) {
|
if (!isTop) {
|
||||||
SessionList item = list.removeAt(index);
|
list.insert(0, list.removeAt(index));
|
||||||
list.insert(0, item);
|
|
||||||
}
|
}
|
||||||
loadingState.refresh();
|
loadingState.refresh();
|
||||||
SmartDialog.showToast('${isTop ? '移除' : ''}置顶成功');
|
SmartDialog.showToast('${isTop ? '移除' : ''}置顶成功');
|
||||||
@@ -130,26 +111,10 @@ class WhisperController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onTap(int index) {
|
void onTap(int index) {
|
||||||
List<SessionList> list = (loadingState.value as Success).response;
|
Session item = loadingState.value.data![index];
|
||||||
list[index].unreadCount = 0;
|
if (item.hasUnread()) {
|
||||||
|
item.clearUnread();
|
||||||
loadingState.refresh();
|
loadingState.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future queryAccountList(List<SessionList> sessionList) async {
|
|
||||||
List<int?> midsList = sessionList.map((e) => e.talkerId).toList();
|
|
||||||
var res = await MsgHttp.accountList(midsList.join(','));
|
|
||||||
if (res['status']) {
|
|
||||||
List<AccountListModel> accountList = res['data'];
|
|
||||||
Map<int, AccountListModel> accountMap = {};
|
|
||||||
for (AccountListModel item in accountList) {
|
|
||||||
accountMap[item.mid!] = item;
|
|
||||||
}
|
|
||||||
for (SessionList item in sessionList) {
|
|
||||||
AccountListModel? accountInfo = accountMap[item.talkerId];
|
|
||||||
if (accountInfo != null) {
|
|
||||||
item.accountInfo = accountInfo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/whisper_item.dart';
|
import 'package:PiliPlus/common/skeleton/whisper_item.dart';
|
||||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
|
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models/msg/session.dart';
|
|
||||||
import 'package:PiliPlus/pages/whisper/controller.dart';
|
import 'package:PiliPlus/pages/whisper/controller.dart';
|
||||||
import 'package:PiliPlus/pages/whisper/widgets/item.dart';
|
import 'package:PiliPlus/pages/whisper/widgets/item.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -38,7 +38,7 @@ class _WhisperPageState extends State<WhisperPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody(LoadingState<List<SessionList>?> loadingState) {
|
Widget _buildBody(LoadingState<List<Session>?> loadingState) {
|
||||||
return switch (loadingState) {
|
return switch (loadingState) {
|
||||||
Loading() => SliverList.builder(
|
Loading() => SliverList.builder(
|
||||||
itemCount: 12,
|
itemCount: 12,
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/models/msg/session.dart';
|
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pb.dart'
|
||||||
|
show Session, UnreadStyle;
|
||||||
|
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||||
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -13,32 +19,19 @@ class WhisperSessionItem extends StatelessWidget {
|
|||||||
required this.onTap,
|
required this.onTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
final SessionList item;
|
final Session item;
|
||||||
final Function(bool isTop, int? talkerId) onSetTop;
|
final Function(bool isTop, int? talkerId) onSetTop;
|
||||||
final ValueChanged<int?> onRemove;
|
final ValueChanged<int?> onRemove;
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
dynamic content = item.lastMsg?.content;
|
Map? vipInfo = item.sessionInfo.hasVipInfo()
|
||||||
|
? jsonDecode(item.sessionInfo.vipInfo)
|
||||||
|
: null;
|
||||||
final ThemeData theme = Theme.of(context);
|
final ThemeData theme = Theme.of(context);
|
||||||
if (content == null || content == "") {
|
|
||||||
content = '不支持的消息类型';
|
|
||||||
} else {
|
|
||||||
dynamic msg = content['text'] ??
|
|
||||||
content['content'] ??
|
|
||||||
content['title'] ??
|
|
||||||
content['reply_content'];
|
|
||||||
if (msg == null) {
|
|
||||||
if (content['imageType'] != null) {
|
|
||||||
msg = '[图片消息]';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
content = msg ?? content.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
tileColor: item.topTs == 0 ? null : theme.colorScheme.onInverseSurface,
|
tileColor: item.isPinned ? theme.colorScheme.onInverseSurface : null,
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -53,10 +46,13 @@ class WhisperSessionItem extends StatelessWidget {
|
|||||||
dense: true,
|
dense: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
onSetTop(item.topTs != 0, item.talkerId);
|
onSetTop(
|
||||||
|
item.isPinned,
|
||||||
|
item.id.privateId.talkerUid.toInt(),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
title: Text(
|
title: Text(
|
||||||
item.topTs == 0 ? '置顶' : '移除置顶',
|
item.isPinned ? '移除置顶' : '置顶',
|
||||||
style: const TextStyle(fontSize: 14),
|
style: const TextStyle(fontSize: 14),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -64,7 +60,7 @@ class WhisperSessionItem extends StatelessWidget {
|
|||||||
dense: true,
|
dense: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
onRemove(item.talkerId);
|
onRemove(item.id.privateId.talkerUid.toInt());
|
||||||
},
|
},
|
||||||
title: const Text(
|
title: const Text(
|
||||||
'删除',
|
'删除',
|
||||||
@@ -82,11 +78,12 @@ class WhisperSessionItem extends StatelessWidget {
|
|||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/whisperDetail',
|
'/whisperDetail',
|
||||||
parameters: {
|
parameters: {
|
||||||
'talkerId': '${item.talkerId}',
|
'talkerId': item.id.privateId.talkerUid.toString(),
|
||||||
'name': item.accountInfo?.name ?? '',
|
'name': item.sessionInfo.sessionName,
|
||||||
'face': item.accountInfo?.face ?? '',
|
'face': item.sessionInfo.avatar.fallbackLayers.layers.first.resource
|
||||||
if (item.accountInfo?.mid != null)
|
.resImage.imageSrc.remote.url,
|
||||||
'mid': '${item.accountInfo?.mid}',
|
if (item.sessionInfo.avatar.hasMid())
|
||||||
|
'mid': item.sessionInfo.avatar.mid.toString(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -96,19 +93,23 @@ class WhisperSessionItem extends StatelessWidget {
|
|||||||
width: 45,
|
width: 45,
|
||||||
height: 45,
|
height: 45,
|
||||||
type: 'avatar',
|
type: 'avatar',
|
||||||
src: item.accountInfo?.face ?? "",
|
src: item.sessionInfo.avatar.fallbackLayers.layers.first
|
||||||
|
.resource.resImage.imageSrc.remote.url,
|
||||||
);
|
);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: item.accountInfo?.mid != null
|
onTap: item.sessionInfo.avatar.hasMid()
|
||||||
? () {
|
? () {
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/member?mid=${item.accountInfo!.mid}',
|
'/member?mid=${item.sessionInfo.avatar.mid}',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
child: item.unreadCount != null && item.unreadCount! > 0
|
child: item.hasUnread() &&
|
||||||
|
item.unread.style != UnreadStyle.UNREAD_STYLE_NONE
|
||||||
? Badge(
|
? Badge(
|
||||||
label: Text(" ${item.unreadCount} "),
|
label: item.unread.style == UnreadStyle.UNREAD_STYLE_NUMBER
|
||||||
|
? Text(" ${item.unread.number} ")
|
||||||
|
: null,
|
||||||
alignment: Alignment.topRight,
|
alignment: Alignment.topRight,
|
||||||
child: buildAvatar(),
|
child: buildAvatar(),
|
||||||
)
|
)
|
||||||
@@ -116,17 +117,45 @@ class WhisperSessionItem extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
title: Text(item.accountInfo?.name ?? ""),
|
title: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
item.sessionInfo.sessionName,
|
||||||
|
style: TextStyle(
|
||||||
|
color: vipInfo?['status'] != null &&
|
||||||
|
vipInfo!['status'] > 0 &&
|
||||||
|
vipInfo['type'] == 2
|
||||||
|
? context.vipColor
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (item.sessionInfo.userLabel.style.borderedLabel.hasText()) ...[
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
PBadge(
|
||||||
|
isStack: false,
|
||||||
|
type: PBadgeType.line_secondary,
|
||||||
|
fontSize: 10,
|
||||||
|
isBold: false,
|
||||||
|
text: item.sessionInfo.userLabel.style.borderedLabel.text,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
if (item.sessionInfo.isLive) ...[
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
Image.asset('assets/images/live/live.gif', height: 15),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
'$content',
|
item.msgSummary.rawMsg,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: theme.textTheme.labelMedium!
|
style: theme.textTheme.labelMedium!
|
||||||
.copyWith(color: theme.colorScheme.outline),
|
.copyWith(color: theme.colorScheme.outline),
|
||||||
),
|
),
|
||||||
trailing: item.lastMsg?.timestamp != null
|
trailing: item.hasTimestamp()
|
||||||
? Text(
|
? Text(
|
||||||
Utils.dateFormat(item.lastMsg!.timestamp, formatType: "day"),
|
Utils.dateFormat((item.timestamp ~/ 1000000).toInt(),
|
||||||
|
formatType: "day"),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: theme.colorScheme.outline,
|
color: theme.colorScheme.outline,
|
||||||
|
|||||||
Reference in New Issue
Block a user