mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 14:22:53 +00:00
add some options
This commit is contained in:
parent
fce85c58f9
commit
4ffd367b23
4 changed files with 15 additions and 48 deletions
|
|
@ -1,25 +0,0 @@
|
|||
// This file is automatically generated, so please do not edit it.
|
||||
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||
|
||||
// ignore_for_file: invalid_use_of_internal_member, unused_import
|
||||
|
||||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
|
||||
import '../frb_generated.dart';
|
||||
|
||||
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `get_all_announced_users`, `get_announced_user_by_public_id`, `get_config`, `get_contact_version`, `get_other_promotions_by_public_id`, `get_own_promotions_after_version`, `get_share_for_contact`, `push_new_user_relation`, `push_own_promotion`, `set_contact_version`, `set_shares`, `store_other_promotion`, `update_config`
|
||||
|
||||
class UserDiscoveryDatabaseStore {
|
||||
const UserDiscoveryDatabaseStore();
|
||||
|
||||
static Future<UserDiscoveryDatabaseStore> default_() => RustLib.instance.api
|
||||
.crateBridgeUserDiscoveryUserDiscoveryDatabaseStoreDefault();
|
||||
|
||||
@override
|
||||
int get hashCode => 0;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is UserDiscoveryDatabaseStore && runtimeType == other.runtimeType;
|
||||
}
|
||||
|
|
@ -43,6 +43,9 @@ class UserData {
|
|||
DateTime? lastImageSend;
|
||||
int? todaysImageCounter;
|
||||
|
||||
String? lastPlanBallance;
|
||||
String? additionalUserInvites;
|
||||
|
||||
// --- SETTINGS ---
|
||||
|
||||
@JsonKey(defaultValue: ThemeMode.system)
|
||||
|
|
@ -78,11 +81,6 @@ class UserData {
|
|||
@JsonKey(defaultValue: true)
|
||||
bool typingIndicators = true;
|
||||
|
||||
String? lastPlanBallance;
|
||||
String? additionalUserInvites;
|
||||
|
||||
List<String>? tutorialDisplayed;
|
||||
|
||||
String? myBestFriendGroupId;
|
||||
|
||||
DateTime? signalLastSignedPreKeyUpdated;
|
||||
|
|
@ -93,6 +91,11 @@ class UserData {
|
|||
@JsonKey(defaultValue: false)
|
||||
bool screenLockEnabled = false;
|
||||
|
||||
// > User Discovery Configurations
|
||||
|
||||
@JsonKey(defaultValue: false)
|
||||
bool isUserDiscoveryEnabled = false;
|
||||
|
||||
// -- Custom DATA --
|
||||
|
||||
@JsonKey(defaultValue: 100_000)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) =>
|
|||
? null
|
||||
: DateTime.parse(json['lastImageSend'] as String)
|
||||
..todaysImageCounter = (json['todaysImageCounter'] as num?)?.toInt()
|
||||
..lastPlanBallance = json['lastPlanBallance'] as String?
|
||||
..additionalUserInvites = json['additionalUserInvites'] as String?
|
||||
..themeMode =
|
||||
$enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
||||
ThemeMode.system
|
||||
|
|
@ -51,11 +53,6 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) =>
|
|||
..autoStoreAllSendUnlimitedMediaFiles =
|
||||
json['autoStoreAllSendUnlimitedMediaFiles'] as bool? ?? false
|
||||
..typingIndicators = json['typingIndicators'] as bool? ?? true
|
||||
..lastPlanBallance = json['lastPlanBallance'] as String?
|
||||
..additionalUserInvites = json['additionalUserInvites'] as String?
|
||||
..tutorialDisplayed = (json['tutorialDisplayed'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList()
|
||||
..myBestFriendGroupId = json['myBestFriendGroupId'] as String?
|
||||
..signalLastSignedPreKeyUpdated =
|
||||
json['signalLastSignedPreKeyUpdated'] == null
|
||||
|
|
@ -64,6 +61,8 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) =>
|
|||
..allowErrorTrackingViaSentry =
|
||||
json['allowErrorTrackingViaSentry'] as bool? ?? false
|
||||
..screenLockEnabled = json['screenLockEnabled'] as bool? ?? false
|
||||
..isUserDiscoveryEnabled =
|
||||
json['isUserDiscoveryEnabled'] as bool? ?? false
|
||||
..currentPreKeyIndexStart =
|
||||
(json['currentPreKeyIndexStart'] as num?)?.toInt() ?? 100000
|
||||
..currentSignedPreKeyIndexStart =
|
||||
|
|
@ -106,6 +105,8 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
|||
'subscriptionPlanIdStore': instance.subscriptionPlanIdStore,
|
||||
'lastImageSend': instance.lastImageSend?.toIso8601String(),
|
||||
'todaysImageCounter': instance.todaysImageCounter,
|
||||
'lastPlanBallance': instance.lastPlanBallance,
|
||||
'additionalUserInvites': instance.additionalUserInvites,
|
||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
||||
'defaultShowTime': instance.defaultShowTime,
|
||||
'requestedAudioPermission': instance.requestedAudioPermission,
|
||||
|
|
@ -119,14 +120,12 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
|||
'autoStoreAllSendUnlimitedMediaFiles':
|
||||
instance.autoStoreAllSendUnlimitedMediaFiles,
|
||||
'typingIndicators': instance.typingIndicators,
|
||||
'lastPlanBallance': instance.lastPlanBallance,
|
||||
'additionalUserInvites': instance.additionalUserInvites,
|
||||
'tutorialDisplayed': instance.tutorialDisplayed,
|
||||
'myBestFriendGroupId': instance.myBestFriendGroupId,
|
||||
'signalLastSignedPreKeyUpdated': instance.signalLastSignedPreKeyUpdated
|
||||
?.toIso8601String(),
|
||||
'allowErrorTrackingViaSentry': instance.allowErrorTrackingViaSentry,
|
||||
'screenLockEnabled': instance.screenLockEnabled,
|
||||
'isUserDiscoveryEnabled': instance.isUserDiscoveryEnabled,
|
||||
'currentPreKeyIndexStart': instance.currentPreKeyIndexStart,
|
||||
'currentSignedPreKeyIndexStart': instance.currentSignedPreKeyIndexStart,
|
||||
'lastChangeLogHash': instance.lastChangeLogHash,
|
||||
|
|
|
|||
|
|
@ -52,17 +52,7 @@ class _ChatListViewState extends State<ChatListView> {
|
|||
});
|
||||
});
|
||||
|
||||
// In case the user is already a Tester, ask him for permission.
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
if (gUser.subscriptionPlan == SubscriptionPlan.Tester.name &&
|
||||
!gUser.askedForUserStudyPermission) {
|
||||
await context.push(
|
||||
Routes.settingsHelpUserStudy,
|
||||
extra: true,
|
||||
);
|
||||
}
|
||||
|
||||
final changeLog = await rootBundle.loadString('CHANGELOG.md');
|
||||
final changeLogHash = (await compute(
|
||||
Sha256().hash,
|
||||
|
|
|
|||
Loading…
Reference in a new issue