fix: ifPresent

This commit is contained in:
Yaros
2026-05-13 18:22:14 +02:00
parent 21506090a5
commit 179e72da7a
2 changed files with 6 additions and 6 deletions
@@ -31,11 +31,11 @@ class DriftMapRepository extends DriftDatabaseRepository {
final hasCustomRange = timeRange.from.isSome || timeRange.to.isSome;
if (hasCustomRange) {
timeRange.from.ifSome((from) {
timeRange.from.ifPresent((from) {
condition = condition & _db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(from);
});
timeRange.to.ifSome((to) {
timeRange.to.ifPresent((to) {
condition = condition & _db.remoteAssetEntity.createdAt.isSmallerOrEqualValue(to);
});
} else if (options.relativeDays > 0) {
@@ -557,11 +557,11 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
final hasCustomRange = timeRange.from.isSome || timeRange.to.isSome;
if (hasCustomRange) {
timeRange.from.ifSome((from) {
timeRange.from.ifPresent((from) {
query.where(_db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(from));
});
timeRange.to.ifSome((to) {
timeRange.to.ifPresent((to) {
query.where(_db.remoteAssetEntity.createdAt.isSmallerOrEqualValue(to));
});
} else if (options.relativeDays > 0) {
@@ -612,11 +612,11 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
final hasCustomRange = timeRange.from.isSome || timeRange.to.isSome;
if (hasCustomRange) {
timeRange.from.ifSome((from) {
timeRange.from.ifPresent((from) {
query.where(_db.remoteAssetEntity.createdAt.isBiggerOrEqualValue(from));
});
timeRange.to.ifSome((to) {
timeRange.to.ifPresent((to) {
query.where(_db.remoteAssetEntity.createdAt.isSmallerOrEqualValue(to));
});
} else if (options.relativeDays > 0) {