mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 21:12:54 +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;
|
DateTime? lastImageSend;
|
||||||
int? todaysImageCounter;
|
int? todaysImageCounter;
|
||||||
|
|
||||||
|
String? lastPlanBallance;
|
||||||
|
String? additionalUserInvites;
|
||||||
|
|
||||||
// --- SETTINGS ---
|
// --- SETTINGS ---
|
||||||
|
|
||||||
@JsonKey(defaultValue: ThemeMode.system)
|
@JsonKey(defaultValue: ThemeMode.system)
|
||||||
|
|
@ -78,11 +81,6 @@ class UserData {
|
||||||
@JsonKey(defaultValue: true)
|
@JsonKey(defaultValue: true)
|
||||||
bool typingIndicators = true;
|
bool typingIndicators = true;
|
||||||
|
|
||||||
String? lastPlanBallance;
|
|
||||||
String? additionalUserInvites;
|
|
||||||
|
|
||||||
List<String>? tutorialDisplayed;
|
|
||||||
|
|
||||||
String? myBestFriendGroupId;
|
String? myBestFriendGroupId;
|
||||||
|
|
||||||
DateTime? signalLastSignedPreKeyUpdated;
|
DateTime? signalLastSignedPreKeyUpdated;
|
||||||
|
|
@ -93,6 +91,11 @@ class UserData {
|
||||||
@JsonKey(defaultValue: false)
|
@JsonKey(defaultValue: false)
|
||||||
bool screenLockEnabled = false;
|
bool screenLockEnabled = false;
|
||||||
|
|
||||||
|
// > User Discovery Configurations
|
||||||
|
|
||||||
|
@JsonKey(defaultValue: false)
|
||||||
|
bool isUserDiscoveryEnabled = false;
|
||||||
|
|
||||||
// -- Custom DATA --
|
// -- Custom DATA --
|
||||||
|
|
||||||
@JsonKey(defaultValue: 100_000)
|
@JsonKey(defaultValue: 100_000)
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) =>
|
||||||
? null
|
? null
|
||||||
: DateTime.parse(json['lastImageSend'] as String)
|
: DateTime.parse(json['lastImageSend'] as String)
|
||||||
..todaysImageCounter = (json['todaysImageCounter'] as num?)?.toInt()
|
..todaysImageCounter = (json['todaysImageCounter'] as num?)?.toInt()
|
||||||
|
..lastPlanBallance = json['lastPlanBallance'] as String?
|
||||||
|
..additionalUserInvites = json['additionalUserInvites'] as String?
|
||||||
..themeMode =
|
..themeMode =
|
||||||
$enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
$enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
||||||
ThemeMode.system
|
ThemeMode.system
|
||||||
|
|
@ -51,11 +53,6 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) =>
|
||||||
..autoStoreAllSendUnlimitedMediaFiles =
|
..autoStoreAllSendUnlimitedMediaFiles =
|
||||||
json['autoStoreAllSendUnlimitedMediaFiles'] as bool? ?? false
|
json['autoStoreAllSendUnlimitedMediaFiles'] as bool? ?? false
|
||||||
..typingIndicators = json['typingIndicators'] as bool? ?? true
|
..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?
|
..myBestFriendGroupId = json['myBestFriendGroupId'] as String?
|
||||||
..signalLastSignedPreKeyUpdated =
|
..signalLastSignedPreKeyUpdated =
|
||||||
json['signalLastSignedPreKeyUpdated'] == null
|
json['signalLastSignedPreKeyUpdated'] == null
|
||||||
|
|
@ -64,6 +61,8 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) =>
|
||||||
..allowErrorTrackingViaSentry =
|
..allowErrorTrackingViaSentry =
|
||||||
json['allowErrorTrackingViaSentry'] as bool? ?? false
|
json['allowErrorTrackingViaSentry'] as bool? ?? false
|
||||||
..screenLockEnabled = json['screenLockEnabled'] as bool? ?? false
|
..screenLockEnabled = json['screenLockEnabled'] as bool? ?? false
|
||||||
|
..isUserDiscoveryEnabled =
|
||||||
|
json['isUserDiscoveryEnabled'] as bool? ?? false
|
||||||
..currentPreKeyIndexStart =
|
..currentPreKeyIndexStart =
|
||||||
(json['currentPreKeyIndexStart'] as num?)?.toInt() ?? 100000
|
(json['currentPreKeyIndexStart'] as num?)?.toInt() ?? 100000
|
||||||
..currentSignedPreKeyIndexStart =
|
..currentSignedPreKeyIndexStart =
|
||||||
|
|
@ -106,6 +105,8 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
||||||
'subscriptionPlanIdStore': instance.subscriptionPlanIdStore,
|
'subscriptionPlanIdStore': instance.subscriptionPlanIdStore,
|
||||||
'lastImageSend': instance.lastImageSend?.toIso8601String(),
|
'lastImageSend': instance.lastImageSend?.toIso8601String(),
|
||||||
'todaysImageCounter': instance.todaysImageCounter,
|
'todaysImageCounter': instance.todaysImageCounter,
|
||||||
|
'lastPlanBallance': instance.lastPlanBallance,
|
||||||
|
'additionalUserInvites': instance.additionalUserInvites,
|
||||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
||||||
'defaultShowTime': instance.defaultShowTime,
|
'defaultShowTime': instance.defaultShowTime,
|
||||||
'requestedAudioPermission': instance.requestedAudioPermission,
|
'requestedAudioPermission': instance.requestedAudioPermission,
|
||||||
|
|
@ -119,14 +120,12 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
||||||
'autoStoreAllSendUnlimitedMediaFiles':
|
'autoStoreAllSendUnlimitedMediaFiles':
|
||||||
instance.autoStoreAllSendUnlimitedMediaFiles,
|
instance.autoStoreAllSendUnlimitedMediaFiles,
|
||||||
'typingIndicators': instance.typingIndicators,
|
'typingIndicators': instance.typingIndicators,
|
||||||
'lastPlanBallance': instance.lastPlanBallance,
|
|
||||||
'additionalUserInvites': instance.additionalUserInvites,
|
|
||||||
'tutorialDisplayed': instance.tutorialDisplayed,
|
|
||||||
'myBestFriendGroupId': instance.myBestFriendGroupId,
|
'myBestFriendGroupId': instance.myBestFriendGroupId,
|
||||||
'signalLastSignedPreKeyUpdated': instance.signalLastSignedPreKeyUpdated
|
'signalLastSignedPreKeyUpdated': instance.signalLastSignedPreKeyUpdated
|
||||||
?.toIso8601String(),
|
?.toIso8601String(),
|
||||||
'allowErrorTrackingViaSentry': instance.allowErrorTrackingViaSentry,
|
'allowErrorTrackingViaSentry': instance.allowErrorTrackingViaSentry,
|
||||||
'screenLockEnabled': instance.screenLockEnabled,
|
'screenLockEnabled': instance.screenLockEnabled,
|
||||||
|
'isUserDiscoveryEnabled': instance.isUserDiscoveryEnabled,
|
||||||
'currentPreKeyIndexStart': instance.currentPreKeyIndexStart,
|
'currentPreKeyIndexStart': instance.currentPreKeyIndexStart,
|
||||||
'currentSignedPreKeyIndexStart': instance.currentSignedPreKeyIndexStart,
|
'currentSignedPreKeyIndexStart': instance.currentSignedPreKeyIndexStart,
|
||||||
'lastChangeLogHash': instance.lastChangeLogHash,
|
'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 {
|
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 changeLog = await rootBundle.loadString('CHANGELOG.md');
|
||||||
final changeLogHash = (await compute(
|
final changeLogHash = (await compute(
|
||||||
Sha256().hash,
|
Sha256().hash,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue