feat(app): смена сервера API и очистка данных устройства при выходе
Адрес бэкенда хранится в shared_preferences и читается до runApp; switchApiBaseUrl сбрасывает токены и кэш старого сервера. Выход стирает refresh-токен и sqlite-кэш ответов. Экран настроек переделан под разделы.
This commit is contained in:
Vendored
+2
-1
@@ -15,7 +15,8 @@ extension CachedResponseX<T> on Response<T> {
|
||||
/// Wraps this response's data with the staleness [CacheInterceptor] recorded
|
||||
/// in `extra['fetchedAt']`. A provider that wants offline support returns
|
||||
/// `r.cached` instead of `r.data!`.
|
||||
Cached<T> get cached => Cached(data as T, fetchedAt: extra['fetchedAt'] as DateTime?);
|
||||
Cached<T> get cached =>
|
||||
Cached(data as T, fetchedAt: extra['fetchedAt'] as DateTime?);
|
||||
}
|
||||
|
||||
/// The oldest of several fetch times, or null if none of them is stale.
|
||||
|
||||
Reference in New Issue
Block a user