Browse Source

out压缩包替换;

新增好友列表接口;
动态页面更改;
wr_202303
wurong 4 months ago
parent
commit
759bd9a31d
  1. 2
      lib/im/SocketClient.dart
  2. 1
      lib/im/chat_details_page.dart
  3. 2
      lib/im/im_view/im_page.dart
  4. 2
      lib/im/out/message.pb.dart
  5. 24
      lib/im/out/message.pbenum.dart
  6. 16
      lib/im/out/message.pbjson.dart
  7. 1059
      lib/mine/personal_page.dart
  8. 5
      lib/retrofit/retrofit_api.dart
  9. 26
      lib/retrofit/retrofit_api.g.dart

2
lib/im/SocketClient.dart

@ -89,7 +89,7 @@ class SocketClient {
}
message["id"] = id;
Uint8List data = utf8.encode(content);
MsgData msgData = MsgData(to: toId, from: userId, type: MsgType.SINGLE_TEXT, data: data);
MsgData msgData = MsgData(to: toId, from: userId, type: MsgType.COMMAND, data: data);
final proto2 = Proto(5, 1, msgData.writeToBuffer());
_socket.add(proto2.toBytes());
debugPrint("sendMessage: ${message["id"]}");

1
lib/im/chat_details_page.dart

@ -6,7 +6,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/im/database/message.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';

2
lib/im/im_view/im_page.dart

@ -366,7 +366,7 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
Expanded(
child: Text(
"喽哈 $userId",
overflow: TextOverflow.fade,
// overflow: TextOverflow.fade,
maxLines: 1,
style: TextStyle(
fontSize: 16.sp,

2
lib/im/out/message.pb.dart

@ -51,7 +51,7 @@ class MsgData extends $pb.GeneratedMessage {
..aOS(1, _omitFieldNames ? '' : 'to')
..aOS(2, _omitFieldNames ? '' : 'from')
..a<$core.int>(3, _omitFieldNames ? '' : 'ctime', $pb.PbFieldType.OU3)
..e<MsgType>(4, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: MsgType.SINGLE_TEXT, valueOf: MsgType.valueOf, enumValues: MsgType.values)
..e<MsgType>(4, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: MsgType.COMMAND, valueOf: MsgType.valueOf, enumValues: MsgType.values)
..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'data', $pb.PbFieldType.OY)
..hasRequiredFields = false
;

24
lib/im/out/message.pbenum.dart

@ -14,16 +14,24 @@ import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
class MsgType extends $pb.ProtobufEnum {
static const MsgType SINGLE_TEXT = MsgType._(0, _omitEnumNames ? '' : 'SINGLE_TEXT');
static const MsgType SINGLE_AUDIO = MsgType._(1, _omitEnumNames ? '' : 'SINGLE_AUDIO');
static const MsgType GROUP_TEXT = MsgType._(2, _omitEnumNames ? '' : 'GROUP_TEXT');
static const MsgType GROUP_AUDIO = MsgType._(3, _omitEnumNames ? '' : 'GROUP_AUDIO');
static const MsgType COMMAND = MsgType._(0, _omitEnumNames ? '' : 'COMMAND');
static const MsgType TEXT = MsgType._(1, _omitEnumNames ? '' : 'TEXT');
static const MsgType IMAGE = MsgType._(2, _omitEnumNames ? '' : 'IMAGE');
static const MsgType AUDIO = MsgType._(3, _omitEnumNames ? '' : 'AUDIO');
static const MsgType VIDEO = MsgType._(4, _omitEnumNames ? '' : 'VIDEO');
static const MsgType PACKET = MsgType._(5, _omitEnumNames ? '' : 'PACKET');
static const MsgType TRANSFER = MsgType._(6, _omitEnumNames ? '' : 'TRANSFER');
static const MsgType LOCATION = MsgType._(7, _omitEnumNames ? '' : 'LOCATION');
static const $core.List<MsgType> values = <MsgType> [
SINGLE_TEXT,
SINGLE_AUDIO,
GROUP_TEXT,
GROUP_AUDIO,
COMMAND,
TEXT,
IMAGE,
AUDIO,
VIDEO,
PACKET,
TRANSFER,
LOCATION,
];
static final $core.Map<$core.int, MsgType> _byValue = $pb.ProtobufEnum.initByValue(values);

16
lib/im/out/message.pbjson.dart

@ -17,17 +17,21 @@ import 'dart:typed_data' as $typed_data;
const MsgType$json = {
'1': 'MsgType',
'2': [
{'1': 'SINGLE_TEXT', '2': 0},
{'1': 'SINGLE_AUDIO', '2': 1},
{'1': 'GROUP_TEXT', '2': 2},
{'1': 'GROUP_AUDIO', '2': 3},
{'1': 'COMMAND', '2': 0},
{'1': 'TEXT', '2': 1},
{'1': 'IMAGE', '2': 2},
{'1': 'AUDIO', '2': 3},
{'1': 'VIDEO', '2': 4},
{'1': 'PACKET', '2': 5},
{'1': 'TRANSFER', '2': 6},
{'1': 'LOCATION', '2': 7},
],
};
/// Descriptor for `MsgType`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List msgTypeDescriptor = $convert.base64Decode(
'CgdNc2dUeXBlEg8KC1NJTkdMRV9URVhUEAASEAoMU0lOR0xFX0FVRElPEAESDgoKR1JPVVBfVE'
'VYVBACEg8KC0dST1VQX0FVRElPEAM=');
'CgdNc2dUeXBlEgsKB0NPTU1BTkQQABIICgRURVhUEAESCQoFSU1BR0UQAhIJCgVBVURJTxADEg'
'kKBVZJREVPEAQSCgoGUEFDS0VUEAUSDAoIVFJBTlNGRVIQBhIMCghMT0NBVElPThAH');
@$core.Deprecated('Use msgDataDescriptor instead')
const MsgData$json = {

1059
lib/mine/personal_page.dart

File diff suppressed because it is too large Load Diff

5
lib/retrofit/retrofit_api.dart

@ -445,6 +445,11 @@ abstract class ApiService {
Future<BaseData<PageInfo<ListData>>> followList(
@Body() Map<String, dynamic> map);
///
@POST("/member/mutualFollow/list")
Future<BaseData<PageInfo<ListData>>> mutualFollowList(
@Body() Map<String, dynamic> map);
////
@PUT("/member/follow/{followId}")
Future<BaseData> follow(@Path("followId") String followId);

26
lib/retrofit/retrofit_api.g.dart

@ -1412,6 +1412,32 @@ class _ApiService implements ApiService {
return value;
}
@override
Future<BaseData<PageInfo<ListData>>> mutualFollowList(map) async {
ArgumentError.checkNotNull(map, 'map');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(map ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/member/mutualFollow/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<PageInfo<ListData>>.fromJson(
_result.data,
(json) => PageInfo<ListData>.fromJson(
json,
(json) => ListData.fromJson(json),
),
);
return value;
}
@override
Future<BaseData<dynamic>> follow(followId) async {
ArgumentError.checkNotNull(followId, 'followId');

Loading…
Cancel
Save