Compare commits
No commits in common. "0241c5f804940dadeefd32ba5ad6dbc5e007184a" and "d654c162e35bd5fec216575bb92077691d71ebf7" have entirely different histories.
0241c5f804
...
d654c162e3
@ -772,10 +772,5 @@
|
||||
"postViewInGlobalDescription": "Do not view the post in the specific realm.",
|
||||
"postDraftSaved": "The draft has been saved.",
|
||||
"postDraftBox": "Draft Box",
|
||||
"postShuffle": "Read Randomly",
|
||||
"checkInStreak": {
|
||||
"zero": "No streak",
|
||||
"one": "{} day streak",
|
||||
"other": "{} days streak"
|
||||
}
|
||||
"postShuffle": "Read Randomly"
|
||||
}
|
||||
|
@ -770,10 +770,5 @@
|
||||
"postViewInGlobalDescription": "不查看特定领域的帖子。",
|
||||
"postDraftSaved": "已保存为草稿。",
|
||||
"postDraftBox": "草稿箱",
|
||||
"postShuffle": "随便看看",
|
||||
"checkInStreak": {
|
||||
"zero": "无连击",
|
||||
"one": "连续签到 {} 天",
|
||||
"other": "连续签到 {} 天"
|
||||
}
|
||||
"postShuffle": "随便看看"
|
||||
}
|
||||
|
@ -770,10 +770,5 @@
|
||||
"postViewInGlobalDescription": "不查看特定領域的帖子。",
|
||||
"postDraftSaved": "已保存為草稿。",
|
||||
"postDraftBox": "草稿箱",
|
||||
"postShuffle": "隨便看看",
|
||||
"checkInStreak": {
|
||||
"zero": "無連擊",
|
||||
"one": "連續簽到 {} 天",
|
||||
"other": "連續簽到 {} 天"
|
||||
}
|
||||
"postShuffle": "隨便看看"
|
||||
}
|
||||
|
@ -770,10 +770,5 @@
|
||||
"postViewInGlobalDescription": "不查看特定領域的帖子。",
|
||||
"postDraftSaved": "已保存為草稿。",
|
||||
"postDraftBox": "草稿箱",
|
||||
"postShuffle": "隨便看看",
|
||||
"checkInStreak": {
|
||||
"zero": "無連擊",
|
||||
"one": "連續簽到 {} 天",
|
||||
"other": "連續簽到 {} 天"
|
||||
}
|
||||
"postShuffle": "隨便看看"
|
||||
}
|
||||
|
@ -23,6 +23,8 @@ class $SnLocalChatChannelTable extends SnLocalChatChannel
|
||||
late final GeneratedColumn<String> alias = GeneratedColumn<String>(
|
||||
'alias', aliasedName, false,
|
||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnChannel, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -58,6 +60,7 @@ class $SnLocalChatChannelTable extends SnLocalChatChannel
|
||||
} else if (isInserting) {
|
||||
context.missing(_aliasMeta);
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||
@ -292,6 +295,8 @@ class $SnLocalChatMessageTable extends SnLocalChatMessage
|
||||
late final GeneratedColumn<int> senderId = GeneratedColumn<int>(
|
||||
'sender_id', aliasedName, true,
|
||||
type: DriftSqlType.int, requiredDuringInsert: false);
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnChatMessage, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -333,6 +338,7 @@ class $SnLocalChatMessageTable extends SnLocalChatMessage
|
||||
context.handle(_senderIdMeta,
|
||||
senderId.isAcceptableOrUnknown(data['sender_id']!, _senderIdMeta));
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||
@ -598,6 +604,8 @@ class $SnLocalChannelMemberTable extends SnLocalChannelMember
|
||||
late final GeneratedColumn<int> accountId = GeneratedColumn<int>(
|
||||
'account_id', aliasedName, false,
|
||||
type: DriftSqlType.int, requiredDuringInsert: true);
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnChannelMember, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -647,6 +655,7 @@ class $SnLocalChannelMemberTable extends SnLocalChannelMember
|
||||
} else if (isInserting) {
|
||||
context.missing(_accountIdMeta);
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||
@ -1256,6 +1265,8 @@ class $SnLocalAccountTable extends SnLocalAccount
|
||||
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
||||
'name', aliasedName, false,
|
||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnAccount, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -1297,6 +1308,7 @@ class $SnLocalAccountTable extends SnLocalAccount
|
||||
} else if (isInserting) {
|
||||
context.missing(_nameMeta);
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||
@ -1570,6 +1582,8 @@ class $SnLocalAttachmentTable extends SnLocalAttachment
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'));
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnAttachment, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -1625,6 +1639,7 @@ class $SnLocalAttachmentTable extends SnLocalAttachment
|
||||
} else if (isInserting) {
|
||||
context.missing(_uuidMeta);
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('account_id')) {
|
||||
context.handle(_accountIdMeta,
|
||||
accountId.isAcceptableOrUnknown(data['account_id']!, _accountIdMeta));
|
||||
@ -1953,6 +1968,8 @@ class $SnLocalStickerTable extends SnLocalSticker
|
||||
late final GeneratedColumn<String> fullAlias = GeneratedColumn<String>(
|
||||
'full_alias', aliasedName, false,
|
||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnSticker, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -1994,6 +2011,7 @@ class $SnLocalStickerTable extends SnLocalSticker
|
||||
} else if (isInserting) {
|
||||
context.missing(_fullAliasMeta);
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||
@ -2243,6 +2261,8 @@ class $SnLocalStickerPackTable extends SnLocalStickerPack
|
||||
requiredDuringInsert: false,
|
||||
defaultConstraints:
|
||||
GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
|
||||
static const VerificationMeta _contentMeta =
|
||||
const VerificationMeta('content');
|
||||
@override
|
||||
late final GeneratedColumnWithTypeConverter<SnStickerPack, String> content =
|
||||
GeneratedColumn<String>('content', aliasedName, false,
|
||||
@ -2273,6 +2293,7 @@ class $SnLocalStickerPackTable extends SnLocalStickerPack
|
||||
if (data.containsKey('id')) {
|
||||
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
||||
}
|
||||
context.handle(_contentMeta, const VerificationResult.success());
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||
|
@ -238,12 +238,12 @@ class _ExploreScreenState extends State<ExploreScreen>
|
||||
icon: _listKey.currentState?.realm != null
|
||||
? AccountImage(
|
||||
content: _listKey.currentState!.realm!.avatar,
|
||||
radius: 14,
|
||||
radius: 18,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/icon/icon-dark.png',
|
||||
width: 32,
|
||||
height: 32,
|
||||
width: 36,
|
||||
height: 36,
|
||||
color: Theme.of(context)
|
||||
.appBarTheme
|
||||
.foregroundColor,
|
||||
|
@ -546,26 +546,11 @@ class _HomeDashCheckInWidgetState extends State<_HomeDashCheckInWidget> {
|
||||
'+${_todayRecord!.resultExperience} EXP',
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
),
|
||||
if (_todayRecord!.resultCoin > 0)
|
||||
if (_todayRecord!.resultCoin >= 0)
|
||||
Text(
|
||||
'+${_todayRecord!.resultCoin} ${'walletCurrencyShort'.tr()}',
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
),
|
||||
if (_todayRecord!.currentStreak > 0)
|
||||
Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Symbols.local_fire_department,
|
||||
size: 14,
|
||||
).padding(bottom: 2),
|
||||
const Gap(4),
|
||||
Text(
|
||||
'checkInStreak'
|
||||
.plural(_todayRecord!.currentStreak),
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
],
|
||||
).padding(top: 4),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -25,13 +25,11 @@ abstract class SnCheckInRecord with _$SnCheckInRecord {
|
||||
required int resultTier,
|
||||
required int resultExperience,
|
||||
required double resultCoin,
|
||||
@Default(0) int currentStreak,
|
||||
required List<int> resultModifiers,
|
||||
required int accountId,
|
||||
}) = _SnCheckInRecord;
|
||||
|
||||
factory SnCheckInRecord.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnCheckInRecordFromJson(json);
|
||||
factory SnCheckInRecord.fromJson(Map<String, dynamic> json) => _$SnCheckInRecordFromJson(json);
|
||||
|
||||
String get symbol => kCheckInResultTierSymbols[resultTier];
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ mixin _$SnCheckInRecord {
|
||||
int get resultTier;
|
||||
int get resultExperience;
|
||||
double get resultCoin;
|
||||
int get currentStreak;
|
||||
List<int> get resultModifiers;
|
||||
int get accountId;
|
||||
|
||||
@ -55,8 +54,6 @@ mixin _$SnCheckInRecord {
|
||||
other.resultExperience == resultExperience) &&
|
||||
(identical(other.resultCoin, resultCoin) ||
|
||||
other.resultCoin == resultCoin) &&
|
||||
(identical(other.currentStreak, currentStreak) ||
|
||||
other.currentStreak == currentStreak) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.resultModifiers, resultModifiers) &&
|
||||
(identical(other.accountId, accountId) ||
|
||||
@ -74,13 +71,12 @@ mixin _$SnCheckInRecord {
|
||||
resultTier,
|
||||
resultExperience,
|
||||
resultCoin,
|
||||
currentStreak,
|
||||
const DeepCollectionEquality().hash(resultModifiers),
|
||||
accountId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, currentStreak: $currentStreak, resultModifiers: $resultModifiers, accountId: $accountId)';
|
||||
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)';
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,7 +94,6 @@ abstract mixin class $SnCheckInRecordCopyWith<$Res> {
|
||||
int resultTier,
|
||||
int resultExperience,
|
||||
double resultCoin,
|
||||
int currentStreak,
|
||||
List<int> resultModifiers,
|
||||
int accountId});
|
||||
}
|
||||
@ -123,7 +118,6 @@ class _$SnCheckInRecordCopyWithImpl<$Res>
|
||||
Object? resultTier = null,
|
||||
Object? resultExperience = null,
|
||||
Object? resultCoin = null,
|
||||
Object? currentStreak = null,
|
||||
Object? resultModifiers = null,
|
||||
Object? accountId = null,
|
||||
}) {
|
||||
@ -156,10 +150,6 @@ class _$SnCheckInRecordCopyWithImpl<$Res>
|
||||
? _self.resultCoin
|
||||
: resultCoin // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
currentStreak: null == currentStreak
|
||||
? _self.currentStreak
|
||||
: currentStreak // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
resultModifiers: null == resultModifiers
|
||||
? _self.resultModifiers
|
||||
: resultModifiers // ignore: cast_nullable_to_non_nullable
|
||||
@ -183,7 +173,6 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
||||
required this.resultTier,
|
||||
required this.resultExperience,
|
||||
required this.resultCoin,
|
||||
this.currentStreak = 0,
|
||||
required final List<int> resultModifiers,
|
||||
required this.accountId})
|
||||
: _resultModifiers = resultModifiers,
|
||||
@ -205,9 +194,6 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
||||
final int resultExperience;
|
||||
@override
|
||||
final double resultCoin;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int currentStreak;
|
||||
final List<int> _resultModifiers;
|
||||
@override
|
||||
List<int> get resultModifiers {
|
||||
@ -252,8 +238,6 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
||||
other.resultExperience == resultExperience) &&
|
||||
(identical(other.resultCoin, resultCoin) ||
|
||||
other.resultCoin == resultCoin) &&
|
||||
(identical(other.currentStreak, currentStreak) ||
|
||||
other.currentStreak == currentStreak) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._resultModifiers, _resultModifiers) &&
|
||||
(identical(other.accountId, accountId) ||
|
||||
@ -271,13 +255,12 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
||||
resultTier,
|
||||
resultExperience,
|
||||
resultCoin,
|
||||
currentStreak,
|
||||
const DeepCollectionEquality().hash(_resultModifiers),
|
||||
accountId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, currentStreak: $currentStreak, resultModifiers: $resultModifiers, accountId: $accountId)';
|
||||
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)';
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,7 +280,6 @@ abstract mixin class _$SnCheckInRecordCopyWith<$Res>
|
||||
int resultTier,
|
||||
int resultExperience,
|
||||
double resultCoin,
|
||||
int currentStreak,
|
||||
List<int> resultModifiers,
|
||||
int accountId});
|
||||
}
|
||||
@ -322,7 +304,6 @@ class __$SnCheckInRecordCopyWithImpl<$Res>
|
||||
Object? resultTier = null,
|
||||
Object? resultExperience = null,
|
||||
Object? resultCoin = null,
|
||||
Object? currentStreak = null,
|
||||
Object? resultModifiers = null,
|
||||
Object? accountId = null,
|
||||
}) {
|
||||
@ -355,10 +336,6 @@ class __$SnCheckInRecordCopyWithImpl<$Res>
|
||||
? _self.resultCoin
|
||||
: resultCoin // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
currentStreak: null == currentStreak
|
||||
? _self.currentStreak
|
||||
: currentStreak // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
resultModifiers: null == resultModifiers
|
||||
? _self._resultModifiers
|
||||
: resultModifiers // ignore: cast_nullable_to_non_nullable
|
||||
|
@ -17,7 +17,6 @@ _SnCheckInRecord _$SnCheckInRecordFromJson(Map<String, dynamic> json) =>
|
||||
resultTier: (json['result_tier'] as num).toInt(),
|
||||
resultExperience: (json['result_experience'] as num).toInt(),
|
||||
resultCoin: (json['result_coin'] as num).toDouble(),
|
||||
currentStreak: (json['current_streak'] as num?)?.toInt() ?? 0,
|
||||
resultModifiers: (json['result_modifiers'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
@ -33,7 +32,6 @@ Map<String, dynamic> _$SnCheckInRecordToJson(_SnCheckInRecord instance) =>
|
||||
'result_tier': instance.resultTier,
|
||||
'result_experience': instance.resultExperience,
|
||||
'result_coin': instance.resultCoin,
|
||||
'current_streak': instance.currentStreak,
|
||||
'result_modifiers': instance.resultModifiers,
|
||||
'account_id': instance.accountId,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user