mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 10:08:02 -06:00
Finished inbox, fixed reverse sort order, bloc refactorings
This commit is contained in:
@@ -22,3 +22,17 @@ extension DuplicateCheckable<T> on Iterable<T> {
|
||||
return toSet().length != length;
|
||||
}
|
||||
}
|
||||
|
||||
extension DateHelpers on DateTime {
|
||||
bool get isToday {
|
||||
final now = DateTime.now();
|
||||
return now.day == day && now.month == month && now.year == year;
|
||||
}
|
||||
|
||||
bool get isYesterday {
|
||||
final yesterday = DateTime.now().subtract(const Duration(days: 1));
|
||||
return yesterday.day == day &&
|
||||
yesterday.month == month &&
|
||||
yesterday.year == year;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user