fix(mobile-next): 移除悬浮窗申请与位置发送,通话文案改为语音通话
同步完成后不再索取 SYSTEM_ALERT_WINDOW,去掉旧浮窗服务声明和定位权限/发送入口;历史位置消息仍只读展示。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
092039bc1a
commit
d6fafe7f95
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:openim_common/src/res/lang/zh_CN.dart';
|
||||
import 'package:openim_common/src/widgets/chat/chat_location_view.dart';
|
||||
|
||||
void main() {
|
||||
test('用户可见通话文案不再出现视频通话或音视频通话', () {
|
||||
for (final entry in zh_CN.entries) {
|
||||
expect(entry.value.contains('视频通话'), isFalse, reason: '${entry.key}=${entry.value}');
|
||||
expect(entry.value.contains('音视频通话'), isFalse, reason: '${entry.key}=${entry.value}');
|
||||
}
|
||||
expect(zh_CN['toolboxCall'], '语音通话');
|
||||
expect(zh_CN['audioAndVideoCall'], '语音通话');
|
||||
expect(zh_CN['video'], '视频');
|
||||
});
|
||||
|
||||
test('历史位置描述损坏时仍能解析成只读占位,不抛异常', () {
|
||||
final ok = LocationPreviewData.parse('{"url":"http://x","name":"公司门口","addr":"一楼大厅"}');
|
||||
expect(ok.name, '公司门口');
|
||||
expect(ok.addr, '一楼大厅');
|
||||
expect(ok.url, 'http://x');
|
||||
|
||||
expect(() => LocationPreviewData.parse('{not-json'), returnsNormally);
|
||||
expect(() => LocationPreviewData.parse(null), returnsNormally);
|
||||
expect(() => LocationPreviewData.parse(''), returnsNormally);
|
||||
|
||||
final broken = LocationPreviewData.parse('{not-json');
|
||||
expect(broken.url, isEmpty);
|
||||
expect(broken.name, isNotEmpty);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user