Add TV-friendly Hijri offset control and fix admin schedule scrolling
This commit is contained in:
@@ -120,6 +120,10 @@ class AppSettings extends HiveObject {
|
||||
@HiveField(30)
|
||||
double scaleRunningText;
|
||||
|
||||
// Manual day adjustment applied to displayed Hijri date.
|
||||
@HiveField(31)
|
||||
int hijriOffsetDays;
|
||||
|
||||
AppSettings({
|
||||
this.masjidName = 'Masjid Al-Ikhlas',
|
||||
this.masjidAddress = 'Jl. Kebaikan No. 1',
|
||||
@@ -155,6 +159,7 @@ class AppSettings extends HiveObject {
|
||||
this.scaleCardLabel = 1.0,
|
||||
this.scaleCardBody = 1.0,
|
||||
this.scaleRunningText = 1.0,
|
||||
this.hijriOffsetDays = 0,
|
||||
});
|
||||
|
||||
AppSettings copyWith({
|
||||
@@ -189,6 +194,7 @@ class AppSettings extends HiveObject {
|
||||
double? scaleCardLabel,
|
||||
double? scaleCardBody,
|
||||
double? scaleRunningText,
|
||||
int? hijriOffsetDays,
|
||||
}) {
|
||||
return AppSettings(
|
||||
masjidName: masjidName ?? this.masjidName,
|
||||
@@ -222,6 +228,7 @@ class AppSettings extends HiveObject {
|
||||
scaleCardLabel: scaleCardLabel ?? this.scaleCardLabel,
|
||||
scaleCardBody: scaleCardBody ?? this.scaleCardBody,
|
||||
scaleRunningText: scaleRunningText ?? this.scaleRunningText,
|
||||
hijriOffsetDays: hijriOffsetDays ?? this.hijriOffsetDays,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -270,13 +277,14 @@ class AppSettingsAdapter extends TypeAdapter<AppSettings> {
|
||||
scaleCardLabel: (fields[28] as num?)?.toDouble() ?? 1.0,
|
||||
scaleCardBody: (fields[29] as num?)?.toDouble() ?? 1.0,
|
||||
scaleRunningText: (fields[30] as num?)?.toDouble() ?? 1.0,
|
||||
hijriOffsetDays: fields[31] as int? ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, AppSettings obj) {
|
||||
writer
|
||||
..writeByte(31)
|
||||
..writeByte(32)
|
||||
..writeByte(0)..write(obj.masjidName)
|
||||
..writeByte(1)..write(obj.masjidAddress)
|
||||
..writeByte(2)..write(obj.cityIdApi)
|
||||
@@ -307,7 +315,8 @@ class AppSettingsAdapter extends TypeAdapter<AppSettings> {
|
||||
..writeByte(27)..write(obj.marqueeAnimType)
|
||||
..writeByte(28)..write(obj.scaleCardLabel)
|
||||
..writeByte(29)..write(obj.scaleCardBody)
|
||||
..writeByte(30)..write(obj.scaleRunningText);
|
||||
..writeByte(30)..write(obj.scaleRunningText)
|
||||
..writeByte(31)..write(obj.hijriOffsetDays);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user