mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 11:18:41 +00:00
revert some changes
This commit is contained in:
parent
7063da6a2b
commit
d79e7c5bc7
18 changed files with 128 additions and 138 deletions
|
|
@ -24,3 +24,4 @@ linter:
|
||||||
public_member_api_docs: false
|
public_member_api_docs: false
|
||||||
avoid_catches_without_on_clauses: false
|
avoid_catches_without_on_clauses: false
|
||||||
document_ignores: false
|
document_ignores: false
|
||||||
|
discarded_futures: false
|
||||||
|
|
|
||||||
|
|
@ -138,13 +138,12 @@ Future<bool> authenticateUser(
|
||||||
final auth = LocalAuthentication();
|
final auth = LocalAuthentication();
|
||||||
final didAuthenticate = await auth.authenticate(
|
final didAuthenticate = await auth.authenticate(
|
||||||
localizedReason: localizedReason,
|
localizedReason: localizedReason,
|
||||||
options: const AuthenticationOptions(useErrorDialogs: false),
|
|
||||||
);
|
);
|
||||||
if (didAuthenticate) {
|
if (didAuthenticate) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} on PlatformException catch (e) {
|
} on LocalAuthException catch (e) {
|
||||||
debugPrint(e.toString());
|
Log.error(e.toString());
|
||||||
if (!force) {
|
if (!force) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,9 +118,9 @@ class CameraPreviewControllerView extends StatelessWidget {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return PermissionHandlerView(
|
return PermissionHandlerView(
|
||||||
onSuccess: () async {
|
onSuccess: () {
|
||||||
// setState(() {});
|
// setState(() {});
|
||||||
await selectCamera(0, true, false);
|
selectCamera(0, true, false);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -175,7 +175,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
unawaited(initAsync());
|
initAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initAsync() async {
|
Future<void> initAsync() async {
|
||||||
|
|
@ -410,7 +410,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
try {
|
try {
|
||||||
await cameraController?.startVideoRecording();
|
await cameraController?.startVideoRecording();
|
||||||
videoRecordingTimer =
|
videoRecordingTimer =
|
||||||
Timer.periodic(const Duration(milliseconds: 15), (timer) async {
|
Timer.periodic(const Duration(milliseconds: 15), (timer) {
|
||||||
setState(() {
|
setState(() {
|
||||||
currentTime = DateTime.now();
|
currentTime = DateTime.now();
|
||||||
});
|
});
|
||||||
|
|
@ -419,7 +419,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
maxVideoRecordingTime) {
|
maxVideoRecordingTime) {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
videoRecordingTimer = null;
|
videoRecordingTimer = null;
|
||||||
await stopVideoRecording();
|
stopVideoRecording();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -510,7 +510,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLongPressMoveUpdate: onPanUpdate,
|
onLongPressMoveUpdate: onPanUpdate,
|
||||||
onLongPressStart: (details) async {
|
onLongPressStart: (details) {
|
||||||
setState(() {
|
setState(() {
|
||||||
basePanY = details.localPosition.dy;
|
basePanY = details.localPosition.dy;
|
||||||
baseScaleFactor = widget.selectedCameraDetails.scaleFactor;
|
baseScaleFactor = widget.selectedCameraDetails.scaleFactor;
|
||||||
|
|
@ -524,14 +524,14 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
Rect.fromLTWH(0, 0, renderBox.size.width, renderBox.size.height);
|
Rect.fromLTWH(0, 0, renderBox.size.width, renderBox.size.height);
|
||||||
|
|
||||||
if (containerRect.contains(localPosition)) {
|
if (containerRect.contains(localPosition)) {
|
||||||
await startVideoRecording();
|
startVideoRecording();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLongPressEnd: (a) async {
|
onLongPressEnd: (a) {
|
||||||
await stopVideoRecording();
|
stopVideoRecording();
|
||||||
},
|
},
|
||||||
onPanEnd: (a) async {
|
onPanEnd: (a) {
|
||||||
await stopVideoRecording();
|
stopVideoRecording();
|
||||||
},
|
},
|
||||||
onPanUpdate: onPanUpdate,
|
onPanUpdate: onPanUpdate,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ class CameraSendToViewState extends State<CameraSendToView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// ignore: discarded_futures
|
|
||||||
cameraController?.dispose();
|
cameraController?.dispose();
|
||||||
cameraController = null;
|
cameraController = null;
|
||||||
selectedCameraDetails = SelectedCameraDetails();
|
selectedCameraDetails = SelectedCameraDetails();
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,8 @@ class _TextViewState extends State<TextLayer> {
|
||||||
},
|
},
|
||||||
onTapOutside: (a) async {
|
onTapOutside: (a) async {
|
||||||
widget.layerData.text = textController.text;
|
widget.layerData.text = textController.text;
|
||||||
Future.delayed(const Duration(milliseconds: 100), () {
|
Future.delayed(const Duration(milliseconds: 100), () async {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
setState(() async {
|
|
||||||
widget.layerData.isDeleted = textController.text == '';
|
widget.layerData.isDeleted = textController.text == '';
|
||||||
widget.layerData.isEditing = false;
|
widget.layerData.isEditing = false;
|
||||||
await context
|
await context
|
||||||
|
|
@ -96,7 +95,7 @@ class _TextViewState extends State<TextLayer> {
|
||||||
if (widget.onUpdate != null) {
|
if (widget.onUpdate != null) {
|
||||||
widget.onUpdate!();
|
widget.onUpdate!();
|
||||||
}
|
}
|
||||||
});
|
if (mounted) setState(() {});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -150,13 +149,12 @@ class _TextViewState extends State<TextLayer> {
|
||||||
.watch<ImageEditorProvider>()
|
.watch<ImageEditorProvider>()
|
||||||
.someTextViewIsAlreadyEditing)
|
.someTextViewIsAlreadyEditing)
|
||||||
? null
|
? null
|
||||||
: () {
|
: () async {
|
||||||
setState(() async {
|
|
||||||
await context
|
await context
|
||||||
.read<ImageEditorProvider>()
|
.read<ImageEditorProvider>()
|
||||||
.updateSomeTextViewIsAlreadyEditing(true);
|
.updateSomeTextViewIsAlreadyEditing(true);
|
||||||
widget.layerData.isEditing = true;
|
widget.layerData.isEditing = true;
|
||||||
});
|
if (mounted) setState(() {});
|
||||||
},
|
},
|
||||||
onScaleUpdate: (detail) async {
|
onScaleUpdate: (detail) async {
|
||||||
if (detail.pointerCount == 1) {
|
if (detail.pointerCount == 1) {
|
||||||
|
|
|
||||||
|
|
@ -88,12 +88,11 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
||||||
loadingImage = false;
|
loadingImage = false;
|
||||||
});
|
});
|
||||||
videoController = VideoPlayerController.file(widget.videoFilePath!);
|
videoController = VideoPlayerController.file(widget.videoFilePath!);
|
||||||
// ignore: discarded_futures
|
|
||||||
videoController?.setLooping(true);
|
videoController?.setLooping(true);
|
||||||
videoController?.initialize().then((_) async {
|
videoController?.initialize().then((_) async {
|
||||||
await videoController!.play();
|
await videoController!.play();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
// ignore: invalid_return_type_for_catch_error, argument_type_not_assignable_to_error_handler, discarded_futures
|
// ignore: invalid_return_type_for_catch_error, argument_type_not_assignable_to_error_handler
|
||||||
}).catchError(Log.error);
|
}).catchError(Log.error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +124,6 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
||||||
void dispose() {
|
void dispose() {
|
||||||
isDisposed = true;
|
isDisposed = true;
|
||||||
layers.clear();
|
layers.clear();
|
||||||
// ignore: discarded_futures
|
|
||||||
videoController?.dispose();
|
videoController?.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -229,11 +229,10 @@ class _ShareImageView extends State<ShareImageView> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
onChanged: (a) {
|
onChanged: (a) async {
|
||||||
setState(() async {
|
|
||||||
hideArchivedUsers = !hideArchivedUsers;
|
hideArchivedUsers = !hideArchivedUsers;
|
||||||
await _filterUsers(lastQuery);
|
await _filterUsers(lastQuery);
|
||||||
});
|
if (mounted) setState(() {});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class _ChatListViewState extends State<ChatListView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
unawaited(initAsync());
|
initAsync();
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ class _ChatListViewState extends State<ChatListView> {
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
tutorial?.cancel();
|
tutorial?.cancel();
|
||||||
unawaited(_contactsSub.cancel());
|
_contactsSub.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,8 +148,8 @@ class _ChatListViewState extends State<ChatListView> {
|
||||||
const Text('twonly '),
|
const Text('twonly '),
|
||||||
if (planId != 'Free')
|
if (planId != 'Free')
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
@ -191,8 +191,8 @@ class _ChatListViewState extends State<ChatListView> {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
key: searchForOtherUsers,
|
key: searchForOtherUsers,
|
||||||
icon: const FaIcon(FontAwesomeIcons.userPlus, size: 18),
|
icon: const FaIcon(FontAwesomeIcons.userPlus, size: 18),
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => const AddNewUserView(),
|
builder: (context) => const AddNewUserView(),
|
||||||
|
|
@ -234,8 +234,8 @@ class _ChatListViewState extends State<ChatListView> {
|
||||||
padding: const EdgeInsets.all(10),
|
padding: const EdgeInsets.all(10),
|
||||||
child: OutlinedButton.icon(
|
child: OutlinedButton.icon(
|
||||||
icon: const Icon(Icons.person_add),
|
icon: const Icon(Icons.person_add),
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => const AddNewUserView(),
|
builder: (context) => const AddNewUserView(),
|
||||||
|
|
@ -302,8 +302,8 @@ class _ChatListViewState extends State<ChatListView> {
|
||||||
floatingActionButton: Padding(
|
floatingActionButton: Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 30),
|
padding: const EdgeInsets.only(bottom: 30),
|
||||||
child: FloatingActionButton(
|
child: FloatingActionButton(
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
@ -353,8 +353,8 @@ class _UserListItem extends State<UserListItem> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
unawaited(messagesNotOpenedStream.cancel());
|
messagesNotOpenedStream.cancel();
|
||||||
unawaited(lastMessageStream.cancel());
|
lastMessageStream.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -506,8 +506,8 @@ class _UserListItem extends State<UserListItem> {
|
||||||
trailing: (widget.user.deleted)
|
trailing: (widget.user.deleted)
|
||||||
? null
|
? null
|
||||||
: IconButton(
|
: IconButton(
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
||||||
super.initState();
|
super.initState();
|
||||||
user = widget.contact;
|
user = widget.contact;
|
||||||
textFieldFocus = FocusNode();
|
textFieldFocus = FocusNode();
|
||||||
unawaited(initStreams());
|
initStreams();
|
||||||
|
|
||||||
tutorial = Timer(const Duration(seconds: 1), () async {
|
tutorial = Timer(const Duration(seconds: 1), () async {
|
||||||
tutorial = null;
|
tutorial = null;
|
||||||
|
|
@ -102,8 +102,8 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
unawaited(userSub.cancel());
|
userSub.cancel();
|
||||||
unawaited(messageSub.cancel());
|
messageSub.cancel();
|
||||||
tutorial?.cancel();
|
tutorial?.cancel();
|
||||||
textFieldFocus.dispose();
|
textFieldFocus.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
@ -283,8 +283,8 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: GestureDetector(
|
title: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
@ -426,8 +426,8 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
||||||
currentInputText = value;
|
currentInputText = value;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
onSubmitted: (_) async {
|
onSubmitted: (_) {
|
||||||
await _sendMessage();
|
_sendMessage();
|
||||||
},
|
},
|
||||||
decoration: inputTextMessageDeco(context),
|
decoration: inputTextMessageDeco(context),
|
||||||
),
|
),
|
||||||
|
|
@ -444,8 +444,8 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const FaIcon(FontAwesomeIcons.camera),
|
icon: const FaIcon(FontAwesomeIcons.camera),
|
||||||
padding: const EdgeInsets.all(15),
|
padding: const EdgeInsets.all(15),
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
await Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
// ignore: discarded_futures
|
|
||||||
messageStream?.cancel();
|
messageStream?.cancel();
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
// videoController?.dispose();
|
// videoController?.dispose();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
@ -23,12 +25,12 @@ class _SlidingResponseWidgetState extends State<MessageActions> {
|
||||||
bool gotFeedback = false;
|
bool gotFeedback = false;
|
||||||
|
|
||||||
void _onHorizontalDragUpdate(DragUpdateDetails details) {
|
void _onHorizontalDragUpdate(DragUpdateDetails details) {
|
||||||
setState(() async {
|
setState(() {
|
||||||
_offsetX += details.delta.dx;
|
_offsetX += details.delta.dx;
|
||||||
if (_offsetX > 40) {
|
if (_offsetX > 40) {
|
||||||
_offsetX = 40;
|
_offsetX = 40;
|
||||||
if (!gotFeedback) {
|
if (!gotFeedback) {
|
||||||
await HapticFeedback.heavyImpact();
|
unawaited(HapticFeedback.heavyImpact());
|
||||||
gotFeedback = true;
|
gotFeedback = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// ignore_for_file: inference_failure_on_collection_literal, avoid_dynamic_calls, discarded_futures
|
// ignore_for_file: avoid_dynamic_calls
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
@ -78,7 +78,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
allMediaFiles = [widget.initialMessage!];
|
allMediaFiles = [widget.initialMessage!];
|
||||||
}
|
}
|
||||||
|
|
||||||
unawaited(asyncLoadNextMedia(true));
|
asyncLoadNextMedia(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -96,7 +96,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
final messages =
|
final messages =
|
||||||
twonlyDB.messagesDao.watchMediaMessageNotOpened(widget.contact.userId);
|
twonlyDB.messagesDao.watchMediaMessageNotOpened(widget.contact.userId);
|
||||||
|
|
||||||
_subscription = messages.listen((messages) async {
|
_subscription = messages.listen((messages) {
|
||||||
for (final msg in messages) {
|
for (final msg in messages) {
|
||||||
// if (!allMediaFiles.any((m) => m.messageId == msg.messageId)) {
|
// if (!allMediaFiles.any((m) => m.messageId == msg.messageId)) {
|
||||||
// allMediaFiles.add(msg);
|
// allMediaFiles.add(msg);
|
||||||
|
|
@ -116,7 +116,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
await loadCurrentMediaFile();
|
loadCurrentMediaFile();
|
||||||
// ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
}
|
}
|
||||||
|
|
@ -239,9 +239,9 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
videoController = VideoPlayerController.file(File(videoPathTmp.path));
|
videoController = VideoPlayerController.file(File(videoPathTmp.path));
|
||||||
await videoController
|
await videoController
|
||||||
?.setLooping(content.maxShowTime == gMediaShowInfinite);
|
?.setLooping(content.maxShowTime == gMediaShowInfinite);
|
||||||
await videoController?.initialize().then((_) async {
|
await videoController?.initialize().then((_) {
|
||||||
await videoController!.play();
|
videoController!.play();
|
||||||
videoController?.addListener(() async {
|
videoController?.addListener(() {
|
||||||
setState(() {
|
setState(() {
|
||||||
progress = 1 -
|
progress = 1 -
|
||||||
videoController!.value.position.inSeconds /
|
videoController!.value.position.inSeconds /
|
||||||
|
|
@ -250,7 +250,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
if (content.maxShowTime != gMediaShowInfinite) {
|
if (content.maxShowTime != gMediaShowInfinite) {
|
||||||
if (videoController?.value.position ==
|
if (videoController?.value.position ==
|
||||||
videoController?.value.duration) {
|
videoController?.value.duration) {
|
||||||
await nextMediaOrExit();
|
nextMediaOrExit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -290,10 +290,9 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
void startTimer() {
|
void startTimer() {
|
||||||
nextMediaTimer?.cancel();
|
nextMediaTimer?.cancel();
|
||||||
progressTimer?.cancel();
|
progressTimer?.cancel();
|
||||||
nextMediaTimer =
|
nextMediaTimer = Timer(canBeSeenUntil!.difference(DateTime.now()), () {
|
||||||
Timer(canBeSeenUntil!.difference(DateTime.now()), () async {
|
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
await nextMediaOrExit();
|
nextMediaOrExit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
progressTimer = Timer.periodic(const Duration(milliseconds: 10), (timer) {
|
progressTimer = Timer.periodic(const Duration(milliseconds: 10), (timer) {
|
||||||
|
|
@ -481,7 +480,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
if ((imageBytes != null || videoController != null) &&
|
if ((imageBytes != null || videoController != null) &&
|
||||||
(canBeSeenUntil == null || progress >= 0))
|
(canBeSeenUntil == null || progress >= 0))
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
if (showSendTextMessageInput) {
|
if (showSendTextMessageInput) {
|
||||||
setState(() {
|
setState(() {
|
||||||
showShortReactions = false;
|
showShortReactions = false;
|
||||||
|
|
@ -489,7 +488,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await nextMediaOrExit();
|
nextMediaOrExit();
|
||||||
},
|
},
|
||||||
child: MediaViewSizing(
|
child: MediaViewSizing(
|
||||||
bottomNavigation: bottomNavigation(),
|
bottomNavigation: bottomNavigation(),
|
||||||
|
|
@ -538,8 +537,8 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
if (isRealTwonly && imageBytes == null)
|
if (isRealTwonly && imageBytes == null)
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
await loadCurrentMediaFile(showTwonly: true);
|
loadCurrentMediaFile(showTwonly: true);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -659,9 +658,9 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const FaIcon(FontAwesomeIcons.solidPaperPlane),
|
icon: const FaIcon(FontAwesomeIcons.solidPaperPlane),
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
if (textMessageController.text.isNotEmpty) {
|
if (textMessageController.text.isNotEmpty) {
|
||||||
await sendTextMessage(
|
sendTextMessage(
|
||||||
widget.contact.userId,
|
widget.contact.userId,
|
||||||
TextMessageContent(
|
TextMessageContent(
|
||||||
text: textMessageController.text,
|
text: textMessageController.text,
|
||||||
|
|
@ -739,7 +738,7 @@ class _ReactionButtonsState extends State<ReactionButtons> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
unawaited(initAsync());
|
initAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initAsync() async {
|
Future<void> initAsync() async {
|
||||||
|
|
@ -847,8 +846,8 @@ class _EmojiReactionWidgetState extends State<EmojiReactionWidget> {
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
curve: Curves.linearToEaseOut,
|
curve: Curves.linearToEaseOut,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
await sendTextMessage(
|
sendTextMessage(
|
||||||
widget.userId,
|
widget.userId,
|
||||||
TextMessageContent(
|
TextMessageContent(
|
||||||
text: widget.emoji,
|
text: widget.emoji,
|
||||||
|
|
@ -865,10 +864,12 @@ class _EmojiReactionWidgetState extends State<EmojiReactionWidget> {
|
||||||
selectedShortReaction = 0; // Assuming index is 0 for this example
|
selectedShortReaction = 0; // Assuming index is 0 for this example
|
||||||
});
|
});
|
||||||
Future.delayed(const Duration(milliseconds: 300), () {
|
Future.delayed(const Duration(milliseconds: 300), () {
|
||||||
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.hide();
|
widget.hide();
|
||||||
selectedShortReaction = -1;
|
selectedShortReaction = -1;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: (selectedShortReaction ==
|
child: (selectedShortReaction ==
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,6 @@ class HomeViewState extends State<HomeView> {
|
||||||
void dispose() {
|
void dispose() {
|
||||||
unawaited(selectNotificationStream.close());
|
unawaited(selectNotificationStream.close());
|
||||||
disableCameraTimer?.cancel();
|
disableCameraTimer?.cancel();
|
||||||
// ignore: discarded_futures
|
|
||||||
cameraController?.dispose();
|
cameraController?.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
@ -232,15 +231,14 @@ class HomeViewState extends State<HomeView> {
|
||||||
label: '',
|
label: '',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
onTap: (int index) {
|
onTap: (int index) async {
|
||||||
activePageIdx = index;
|
activePageIdx = index;
|
||||||
setState(() async {
|
|
||||||
await homeViewPageController.animateToPage(
|
await homeViewPageController.animateToPage(
|
||||||
index,
|
index,
|
||||||
duration: const Duration(milliseconds: 100),
|
duration: const Duration(milliseconds: 100),
|
||||||
curve: Curves.bounceIn,
|
curve: Curves.bounceIn,
|
||||||
);
|
);
|
||||||
});
|
if (mounted) setState(() {});
|
||||||
},
|
},
|
||||||
currentIndex: activePageIdx,
|
currentIndex: activePageIdx,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ class MemoriesViewState extends State<MemoriesView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// ignore: discarded_futures
|
|
||||||
messageSub?.cancel();
|
messageSub?.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,15 +218,14 @@ class _BackupViewState extends State<BackupView> {
|
||||||
label: context.lang.backupData,
|
label: context.lang.backupData,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
onTap: (int index) {
|
onTap: (int index) async {
|
||||||
activePageIdx = index;
|
activePageIdx = index;
|
||||||
setState(() async {
|
|
||||||
await pageController.animateToPage(
|
await pageController.animateToPage(
|
||||||
index,
|
index,
|
||||||
duration: const Duration(milliseconds: 100),
|
duration: const Duration(milliseconds: 100),
|
||||||
curve: Curves.bounceIn,
|
curve: Curves.bounceIn,
|
||||||
);
|
);
|
||||||
});
|
if (mounted) setState(() {});
|
||||||
},
|
},
|
||||||
currentIndex: activePageIdx,
|
currentIndex: activePageIdx,
|
||||||
// ),
|
// ),
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,7 @@ class _RetransmissionDataViewState extends State<RetransmissionDataView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// ignore: discarded_futures
|
|
||||||
subscriptionRetransmission?.cancel();
|
subscriptionRetransmission?.cancel();
|
||||||
// ignore: discarded_futures
|
|
||||||
subscriptionContacts?.cancel();
|
subscriptionContacts?.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
52
pubspec.lock
52
pubspec.lock
|
|
@ -5,10 +5,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: "0eb33edbbe99a02e73b8bbeb6f2b65972023d902117ee8d1bf0ea1a79f83aa7b"
|
sha256: c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "90.0.0"
|
version: "91.0.0"
|
||||||
_flutterfire_internals:
|
_flutterfire_internals:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -29,10 +29,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: "711e3a890bb529bf55f07d73b8706f4b7504ad77e90d2f205626b116c048583f"
|
sha256: a40a0cee526a7e1f387c6847bd8a5ccbf510a75952ef8a28338e989558072cb0
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.3.0"
|
version: "8.4.0"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -165,10 +165,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: camera_android_camerax
|
name: camera_android_camerax
|
||||||
sha256: "2c0746d55f513bed55f52e0b5d9bda18c1533bb16bb89ea93d8033f3815e6cd8"
|
sha256: "92dcc36e8ff2fa1ea3acdbb609ca2976cded55dceb719b4869c124c6d011f110"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.23+1"
|
version: "0.6.23+2"
|
||||||
camera_avfoundation:
|
camera_avfoundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -618,10 +618,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_local_notifications
|
name: flutter_local_notifications
|
||||||
sha256: "7ed76be64e8a7d01dfdf250b8434618e2a028c9dfa2a3c41dc9b531d4b3fc8a5"
|
sha256: "19ffb0a8bb7407875555e5e98d7343a633bb73707bae6c6a5f37c90014077875"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "19.4.2"
|
version: "19.5.0"
|
||||||
flutter_local_notifications_linux:
|
flutter_local_notifications_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -655,10 +655,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_plugin_android_lifecycle
|
name: flutter_plugin_android_lifecycle
|
||||||
sha256: c2fe1001710127dfa7da89977a08d591398370d099aacdaa6d44da7eb14b8476
|
sha256: "306f0596590e077338312f38837f595c04f28d6cdeeac392d3d74df2f0003687"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.31"
|
version: "2.0.32"
|
||||||
flutter_secure_storage:
|
flutter_secure_storage:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -847,10 +847,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: image_picker_android
|
name: image_picker_android
|
||||||
sha256: dd7a61daaa5896cc34b7bc95f66c60225ae6bee0d167dde0e21a9d9016cac0dc
|
sha256: "58a85e6f09fe9c4484d53d18a0bd6271b72c53fce1d05e6f745ae36d8c18efca"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.8.13+4"
|
version: "0.8.13+5"
|
||||||
image_picker_for_web:
|
image_picker_for_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -991,26 +991,26 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: local_auth
|
name: local_auth
|
||||||
sha256: "434d854cf478f17f12ab29a76a02b3067f86a63a6d6c4eb8fbfdcfe4879c1b7b"
|
sha256: a4f1bf57f0236a4aeb5e8f0ec180e197f4b112a3456baa6c1e73b546630b0422
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "3.0.0"
|
||||||
local_auth_android:
|
local_auth_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: local_auth_android
|
name: local_auth_android
|
||||||
sha256: b2446c74fab1db37f828d4c54adaa3f003df80a29f5cbd710bbb8883d302e991
|
sha256: d836715ed95b16b2de3a8c47a88ba5e607976bb1e27c9446d193152ea1429fae
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.55"
|
version: "2.0.0"
|
||||||
local_auth_darwin:
|
local_auth_darwin:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: local_auth_darwin
|
name: local_auth_darwin
|
||||||
sha256: "699873970067a40ef2f2c09b4c72eb1cfef64224ef041b3df9fdc5c4c1f91f49"
|
sha256: "15d9db4ad4d58a11d7269e55d46ff8d49ed5e856226c8a5a91280f0d7c37b3a6"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.1"
|
version: "2.0.0"
|
||||||
local_auth_platform_interface:
|
local_auth_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1023,10 +1023,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: local_auth_windows
|
name: local_auth_windows
|
||||||
sha256: bc4e66a29b0fdf751aafbec923b5bed7ad6ed3614875d8151afe2578520b2ab5
|
sha256: d95535a73eddf57ce5930d5e78a0fa4f294c31981fdeeee83325b797302be454
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.11"
|
version: "2.0.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -1175,10 +1175,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
sha256: "3b4c1fc3aa55ddc9cd4aa6759984330d5c8e66aa7702a6223c61540dc6380c37"
|
sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.19"
|
version: "2.2.20"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1651,10 +1651,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: tutorial_coach_mark
|
name: tutorial_coach_mark
|
||||||
sha256: ccc4a2026d361d8a71011d0f131a2278add1a154ef43e33dfd165babbb551c17
|
sha256: "5a325d53bcf16ce7a969e2ab8d4dc9610f39ee3eab2b3cc57d5c98936129b891"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.3"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1795,10 +1795,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: video_player_android
|
name: video_player_android
|
||||||
sha256: a8dc4324f67705de057678372bedb66cd08572fe7c495605ac68c5f503324a39
|
sha256: cf768d02924b91e333e2bc1ff928528f57d686445874f383bafab12d0bdfc340
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.15"
|
version: "2.8.17"
|
||||||
video_player_avfoundation:
|
video_player_avfoundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ dependencies:
|
||||||
introduction_screen: ^4.0.0
|
introduction_screen: ^4.0.0
|
||||||
json_annotation: ^4.9.0
|
json_annotation: ^4.9.0
|
||||||
libsignal_protocol_dart: ^0.7.4
|
libsignal_protocol_dart: ^0.7.4
|
||||||
local_auth: ^2.3.0
|
local_auth: ^3.0.0
|
||||||
logging: ^1.3.0
|
logging: ^1.3.0
|
||||||
lottie: ^3.3.1
|
lottie: ^3.3.1
|
||||||
mutex: ^3.1.0
|
mutex: ^3.1.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue