mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-22 17:42:53 +00:00
fixes small ui issues
This commit is contained in:
parent
37c5ce933d
commit
6ed3af5a92
6 changed files with 29 additions and 8 deletions
|
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.1.6
|
||||||
|
|
||||||
|
- Fix: Phantom push notification
|
||||||
|
- Fix: Smaller UI fixes
|
||||||
|
|
||||||
## 0.1.5
|
## 0.1.5
|
||||||
|
|
||||||
- Fix: Reupload of media files was not working properly
|
- Fix: Reupload of media files was not working properly
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:camera/camera.dart';
|
import 'package:camera/camera.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||||
|
|
@ -33,9 +35,20 @@ void main() async {
|
||||||
globalApplicationSupportDirectory =
|
globalApplicationSupportDirectory =
|
||||||
(await getApplicationSupportDirectory()).path;
|
(await getApplicationSupportDirectory()).path;
|
||||||
|
|
||||||
|
initLogger();
|
||||||
await initFCMService();
|
await initFCMService();
|
||||||
|
|
||||||
final user = await getUser();
|
var user = await getUser();
|
||||||
|
|
||||||
|
if (Platform.isIOS && user != null) {
|
||||||
|
final db = File('$globalApplicationSupportDirectory/twonly.sqlite');
|
||||||
|
if (!db.existsSync()) {
|
||||||
|
Log.error('[twonly] IOS: App was removed and then reinstalled again...');
|
||||||
|
await const FlutterSecureStorage().deleteAll();
|
||||||
|
user = await getUser();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
gUser = user;
|
gUser = user;
|
||||||
|
|
||||||
|
|
@ -57,8 +70,6 @@ void main() async {
|
||||||
await deleteLocalUserData();
|
await deleteLocalUserData();
|
||||||
}
|
}
|
||||||
|
|
||||||
initLogger();
|
|
||||||
|
|
||||||
final settingsController = SettingsChangeProvider();
|
final settingsController = SettingsChangeProvider();
|
||||||
|
|
||||||
await settingsController.loadSettings();
|
await settingsController.loadSettings();
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,8 @@ class MessagesDao extends DatabaseAccessor<TwonlyDB> with _$MessagesDaoMixin {
|
||||||
t.groupId.equals(groupId) &
|
t.groupId.equals(groupId) &
|
||||||
// messages in groups will only be removed in case all members have received it...
|
// messages in groups will only be removed in case all members have received it...
|
||||||
// so ensuring that this message is not shown in the messages anymore
|
// so ensuring that this message is not shown in the messages anymore
|
||||||
t.openedAt.isBiggerThanValue(deletionTime),
|
(t.openedAt.isBiggerThanValue(deletionTime) |
|
||||||
|
t.openedAt.isNull()),
|
||||||
)
|
)
|
||||||
..orderBy([(t) => OrderingTerm.desc(t.createdAt)])
|
..orderBy([(t) => OrderingTerm.desc(t.createdAt)])
|
||||||
..limit(1))
|
..limit(1))
|
||||||
|
|
@ -96,7 +97,8 @@ class MessagesDao extends DatabaseAccessor<TwonlyDB> with _$MessagesDaoMixin {
|
||||||
t.groupId.equals(groupId) &
|
t.groupId.equals(groupId) &
|
||||||
// messages in groups will only be removed in case all members have received it...
|
// messages in groups will only be removed in case all members have received it...
|
||||||
// so ensuring that this message is not shown in the messages anymore
|
// so ensuring that this message is not shown in the messages anymore
|
||||||
t.openedAt.isBiggerThanValue(deletionTime) &
|
(t.openedAt.isBiggerThanValue(deletionTime) |
|
||||||
|
t.openedAt.isNull()) &
|
||||||
(t.isDeletedFromSender.equals(true) |
|
(t.isDeletedFromSender.equals(true) |
|
||||||
(t.type.equals(MessageType.text.name).not() |
|
(t.type.equals(MessageType.text.name).not() |
|
||||||
t.type.equals(MessageType.media.name).not()) |
|
t.type.equals(MessageType.media.name).not()) |
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,11 @@ class PurchasesProvider with ChangeNotifier, DiagnosticableTreeMixin {
|
||||||
};
|
};
|
||||||
final response = await iapConnection.queryProductDetails(ids);
|
final response = await iapConnection.queryProductDetails(ids);
|
||||||
if (response.notFoundIDs.isNotEmpty) {
|
if (response.notFoundIDs.isNotEmpty) {
|
||||||
Log.error(response.notFoundIDs);
|
Log.warn(response.notFoundIDs);
|
||||||
}
|
}
|
||||||
products = response.productDetails.map(PurchasableProduct.new).toList();
|
products = response.productDetails.map(PurchasableProduct.new).toList();
|
||||||
if (products.isEmpty) {
|
if (products.isEmpty) {
|
||||||
Log.error('Could not load any products from the store!');
|
Log.warn('Could not load any products from the store!');
|
||||||
}
|
}
|
||||||
storeState = StoreState.available;
|
storeState = StoreState.available;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,7 @@ class _UserListItem extends State<GroupListItem> {
|
||||||
VerifiedShield(
|
VerifiedShield(
|
||||||
group: widget.group,
|
group: widget.group,
|
||||||
showOnlyIfVerified: true,
|
showOnlyIfVerified: true,
|
||||||
|
clickable: false,
|
||||||
size: 12,
|
size: 12,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,14 @@ class VerifiedShield extends StatefulWidget {
|
||||||
super.key,
|
super.key,
|
||||||
this.size = 15,
|
this.size = 15,
|
||||||
this.showOnlyIfVerified = false,
|
this.showOnlyIfVerified = false,
|
||||||
|
this.clickable = true,
|
||||||
});
|
});
|
||||||
final Group? group;
|
final Group? group;
|
||||||
final Contact? contact;
|
final Contact? contact;
|
||||||
final double size;
|
final double size;
|
||||||
|
|
||||||
final bool showOnlyIfVerified;
|
final bool showOnlyIfVerified;
|
||||||
|
final bool clickable;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VerifiedShield> createState() => _VerifiedShieldState();
|
State<VerifiedShield> createState() => _VerifiedShieldState();
|
||||||
|
|
@ -61,7 +63,7 @@ class _VerifiedShieldState extends State<VerifiedShield> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (!isVerified && widget.showOnlyIfVerified) return Container();
|
if (!isVerified && widget.showOnlyIfVerified) return Container();
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: (contact == null)
|
onTap: (contact == null || !widget.clickable)
|
||||||
? null
|
? null
|
||||||
: () => context.push(Routes.settingsHelpFaqVerifyBadge),
|
: () => context.push(Routes.settingsHelpFaqVerifyBadge),
|
||||||
child: ColoredBox(
|
child: ColoredBox(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue