consolidated downloads dir, nextcloud origin, upload route and chat timestamps; added webdav path tests
This commit is contained in:
@@ -70,10 +70,15 @@ class GetChatResponseObject {
|
||||
_$GetChatResponseObjectFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetChatResponseObjectToJson(this);
|
||||
|
||||
static GetChatResponseObject getDateDummy(int timestamp) {
|
||||
var elementDate = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
||||
return getTextDummy(elementDate.formatDateRelativeShort());
|
||||
}
|
||||
/// [timestamp] is in seconds.
|
||||
DateTime get sentAt => DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
||||
|
||||
static GetChatResponseObject getDateDummy(int timestamp) =>
|
||||
getTextDummy(
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
timestamp * 1000,
|
||||
).formatDateRelativeShort(),
|
||||
);
|
||||
|
||||
static GetChatResponseObject getTextDummy(String text) =>
|
||||
GetChatResponseObject(
|
||||
|
||||
@@ -31,7 +31,7 @@ abstract class WebdavApi<T> {
|
||||
|
||||
static Future<WebDavClient> establishWebdavConnection() async =>
|
||||
NextcloudClient(
|
||||
Uri.parse('https://${EndpointData().nextcloud().full()}'),
|
||||
Uri.parse(EndpointData().nextcloud().origin()),
|
||||
// App password preferred — with 2FA the real password is not accepted
|
||||
// by Nextcloud at all (see NextcloudCredentials.usesLoginFlow).
|
||||
password: SessionManager().requireNextcloud().secret,
|
||||
@@ -41,5 +41,5 @@ abstract class WebdavApi<T> {
|
||||
/// Builds the WebDAV download URL without embedded credentials. Callers must
|
||||
/// authenticate via the [NextcloudCredentials.authHeaders] header instead.
|
||||
static String buildWebdavUrl() =>
|
||||
'https://${EndpointData().nextcloud().full()}/remote.php/dav/files/${SessionManager().requireNextcloud().username}/';
|
||||
'${EndpointData().nextcloud().origin()}/remote.php/dav/files/${SessionManager().requireNextcloud().username}/';
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ class Endpoint {
|
||||
Endpoint({required this.domain, this.path = ''});
|
||||
|
||||
String full() => domain + path;
|
||||
|
||||
/// `https://` + [full], without a trailing slash.
|
||||
String origin() => 'https://${full()}';
|
||||
}
|
||||
|
||||
class EndpointData {
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'dart:io';
|
||||
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter_app_badge/flutter_app_badge.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../api/marianumcloud/talk/share_files_to_chat.dart';
|
||||
@@ -53,7 +52,7 @@ abstract final class SessionWipe {
|
||||
/// unregister it).
|
||||
static Future<void> accountLeft() async {
|
||||
await _stepAsync('download files', () async {
|
||||
final dir = Directory('${(await getTemporaryDirectory()).path}/downloads');
|
||||
final dir = await DownloadManager.downloadsDirectory();
|
||||
if (dir.existsSync()) await dir.delete(recursive: true);
|
||||
});
|
||||
await _stepAsync(
|
||||
|
||||
@@ -60,7 +60,7 @@ class PushRegistration {
|
||||
|
||||
/// Nextcloud origin the registration targets (full origin, no trailing
|
||||
/// slash) — persisted alongside the registration to detect endpoint changes.
|
||||
String get currentNcBaseUrl => 'https://${EndpointData().nextcloud().full()}';
|
||||
String get currentNcBaseUrl => EndpointData().nextcloud().origin();
|
||||
|
||||
NextcloudCredentials? get _nextcloudOrNull =>
|
||||
SessionManager().current?.nextcloud;
|
||||
|
||||
@@ -21,6 +21,7 @@ import '../state/app/modules/marianum_message/bloc/marianum_message_state.dart';
|
||||
import '../utils/url_opener.dart';
|
||||
import '../view/login/nextcloud_login_flow_page.dart';
|
||||
import '../view/pages/files/files.dart';
|
||||
import '../view/pages/files/files_upload_dialog.dart';
|
||||
import '../view/pages/files/sharing/sharee_picker_page.dart';
|
||||
import '../view/pages/foreign_timetable/element_picker_page.dart';
|
||||
import '../view/pages/marianum_message/marianum_message_view.dart';
|
||||
@@ -280,6 +281,23 @@ class AppRoutes {
|
||||
pushScreen(context, withNavBar: false, screen: const FeedbackDialog());
|
||||
}
|
||||
|
||||
static Future<void> openFilesUpload(
|
||||
BuildContext context, {
|
||||
required List<String> filePaths,
|
||||
required String remotePath,
|
||||
required void Function(List<String> uploadedFilePaths) onUploadFinished,
|
||||
bool uniqueNames = false,
|
||||
}) => pushScreen(
|
||||
context,
|
||||
withNavBar: false,
|
||||
screen: FilesUploadDialog(
|
||||
filePaths: filePaths,
|
||||
remotePath: remotePath,
|
||||
onUploadFinished: onUploadFinished,
|
||||
uniqueNames: uniqueNames,
|
||||
),
|
||||
);
|
||||
|
||||
static Future<void> openCacheView(BuildContext context) =>
|
||||
pushScreen(context, withNavBar: false, screen: const CacheView());
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'loadable_state_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'loadable_state_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
@@ -25,16 +26,21 @@ $LoadableStateStateCopyWith<LoadableStateState> get copyWith => _$LoadableStateS
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableStateState&&const DeepCollectionEquality().equals(other.connections, connections));
|
||||
final _this = this as LoadableStateState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableStateState&&const DeepCollectionEquality().equals(other.connections, _this.connections));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(connections));
|
||||
int get hashCode {
|
||||
final _this = this as LoadableStateState;
|
||||
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_this.connections));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadableStateState(connections: $connections)';
|
||||
final _this = this as LoadableStateState;
|
||||
return 'LoadableStateState(connections: ${_this.connections})';
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +69,7 @@ class _$LoadableStateStateCopyWithImpl<$Res>
|
||||
/// Create a copy of LoadableStateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? connections = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(LoadableStateState(
|
||||
connections: freezed == connections ? _self.connections : connections // ignore: cast_nullable_to_non_nullable
|
||||
as List<ConnectivityResult>?,
|
||||
));
|
||||
@@ -206,7 +212,7 @@ return $default(_that.connections);case _:
|
||||
|
||||
|
||||
class _LoadableStateState implements LoadableStateState {
|
||||
const _LoadableStateState({required final List<ConnectivityResult>? connections}): _connections = connections;
|
||||
const _LoadableStateState({required List<ConnectivityResult>? connections}): _connections = connections;
|
||||
|
||||
|
||||
final List<ConnectivityResult>? _connections;
|
||||
@@ -229,16 +235,18 @@ _$LoadableStateStateCopyWith<_LoadableStateState> get copyWith => __$LoadableSta
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableStateState&&const DeepCollectionEquality().equals(other._connections, _connections));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableStateState&&const DeepCollectionEquality().equals(other.connections, _connections));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_connections));
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_connections));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadableStateState(connections: $connections)';
|
||||
return 'LoadableStateState(connections: $connections)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'loadable_state.dart';
|
||||
@@ -9,14 +9,13 @@ part of 'loadable_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$LoadableState<TState> {
|
||||
|
||||
bool get isLoading; TState? get data; int? get lastFetch; void Function()? get reFetch; LoadingError? get error;// Transient progress note under the primary loading spinner (e.g. retry
|
||||
// progress). Lives only within one fetch cycle — never persisted.
|
||||
String? get statusText;
|
||||
bool get isLoading; TState? get data; int? get lastFetch; void Function()? get reFetch; LoadingError? get error; String? get statusText;
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -27,16 +26,21 @@ $LoadableStateCopyWith<TState, LoadableState<TState>> get copyWith => _$Loadable
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableState<TState>&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.lastFetch, lastFetch) || other.lastFetch == lastFetch)&&(identical(other.reFetch, reFetch) || other.reFetch == reFetch)&&(identical(other.error, error) || other.error == error)&&(identical(other.statusText, statusText) || other.statusText == statusText));
|
||||
final _this = this as LoadableState<TState>;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableState<TState>&&(identical(other.isLoading, _this.isLoading) || other.isLoading == _this.isLoading)&&const DeepCollectionEquality().equals(other.data, _this.data)&&(identical(other.lastFetch, _this.lastFetch) || other.lastFetch == _this.lastFetch)&&(identical(other.reFetch, _this.reFetch) || other.reFetch == _this.reFetch)&&(identical(other.error, _this.error) || other.error == _this.error)&&(identical(other.statusText, _this.statusText) || other.statusText == _this.statusText));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isLoading,const DeepCollectionEquality().hash(data),lastFetch,reFetch,error,statusText);
|
||||
int get hashCode {
|
||||
final _this = this as LoadableState<TState>;
|
||||
return Object.hash(runtimeType,_this.isLoading,const DeepCollectionEquality().hash(_this.data),_this.lastFetch,_this.reFetch,_this.error,_this.statusText);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadableState<$TState>(isLoading: $isLoading, data: $data, lastFetch: $lastFetch, reFetch: $reFetch, error: $error, statusText: $statusText)';
|
||||
final _this = this as LoadableState<TState>;
|
||||
return 'LoadableState<$TState>(isLoading: ${_this.isLoading}, data: ${_this.data}, lastFetch: ${_this.lastFetch}, reFetch: ${_this.reFetch}, error: ${_this.error}, statusText: ${_this.statusText})';
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +69,7 @@ class _$LoadableStateCopyWithImpl<TState,$Res>
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? data = freezed,Object? lastFetch = freezed,Object? reFetch = freezed,Object? error = freezed,Object? statusText = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(LoadableState(
|
||||
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||
as TState?,lastFetch: freezed == lastFetch ? _self.lastFetch : lastFetch // ignore: cast_nullable_to_non_nullable
|
||||
@@ -233,8 +237,6 @@ class _LoadableState<TState> extends LoadableState<TState> {
|
||||
@override final int? lastFetch;
|
||||
@override final void Function()? reFetch;
|
||||
@override final LoadingError? error;
|
||||
// Transient progress note under the primary loading spinner (e.g. retry
|
||||
// progress). Lives only within one fetch cycle — never persisted.
|
||||
@override final String? statusText;
|
||||
|
||||
/// Create a copy of LoadableState
|
||||
@@ -247,16 +249,18 @@ _$LoadableStateCopyWith<TState, _LoadableState<TState>> get copyWith => __$Loada
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableState<TState>&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.lastFetch, lastFetch) || other.lastFetch == lastFetch)&&(identical(other.reFetch, reFetch) || other.reFetch == reFetch)&&(identical(other.error, error) || other.error == error)&&(identical(other.statusText, statusText) || other.statusText == statusText));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableState<TState>&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.lastFetch, lastFetch) || other.lastFetch == lastFetch)&&(identical(other.reFetch, reFetch) || other.reFetch == reFetch)&&(identical(other.error, error) || other.error == error)&&(identical(other.statusText, statusText) || other.statusText == statusText));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isLoading,const DeepCollectionEquality().hash(data),lastFetch,reFetch,error,statusText);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,isLoading,const DeepCollectionEquality().hash(data),lastFetch,reFetch,error,statusText);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadableState<$TState>(isLoading: $isLoading, data: $data, lastFetch: $lastFetch, reFetch: $reFetch, error: $error, statusText: $statusText)';
|
||||
return 'LoadableState<$TState>(isLoading: $isLoading, data: $data, lastFetch: $lastFetch, reFetch: $reFetch, error: $error, statusText: $statusText)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'loading_error.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'loading_error.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
@@ -25,16 +26,21 @@ $LoadingErrorCopyWith<LoadingError> get copyWith => _$LoadingErrorCopyWithImpl<L
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadingError&&(identical(other.message, message) || other.message == message)&&(identical(other.technicalDetails, technicalDetails) || other.technicalDetails == technicalDetails)&&(identical(other.allowRetry, allowRetry) || other.allowRetry == allowRetry));
|
||||
final _this = this as LoadingError;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadingError&&(identical(other.message, _this.message) || other.message == _this.message)&&(identical(other.technicalDetails, _this.technicalDetails) || other.technicalDetails == _this.technicalDetails)&&(identical(other.allowRetry, _this.allowRetry) || other.allowRetry == _this.allowRetry));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message,technicalDetails,allowRetry);
|
||||
int get hashCode {
|
||||
final _this = this as LoadingError;
|
||||
return Object.hash(runtimeType,_this.message,_this.technicalDetails,_this.allowRetry);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadingError(message: $message, technicalDetails: $technicalDetails, allowRetry: $allowRetry)';
|
||||
final _this = this as LoadingError;
|
||||
return 'LoadingError(message: ${_this.message}, technicalDetails: ${_this.technicalDetails}, allowRetry: ${_this.allowRetry})';
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +69,7 @@ class _$LoadingErrorCopyWithImpl<$Res>
|
||||
/// Create a copy of LoadingError
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? message = null,Object? technicalDetails = freezed,Object? allowRetry = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(LoadingError(
|
||||
message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||
as String,technicalDetails: freezed == technicalDetails ? _self.technicalDetails : technicalDetails // ignore: cast_nullable_to_non_nullable
|
||||
as String?,allowRetry: null == allowRetry ? _self.allowRetry : allowRetry // ignore: cast_nullable_to_non_nullable
|
||||
@@ -225,16 +231,18 @@ _$LoadingErrorCopyWith<_LoadingError> get copyWith => __$LoadingErrorCopyWithImp
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadingError&&(identical(other.message, message) || other.message == message)&&(identical(other.technicalDetails, technicalDetails) || other.technicalDetails == technicalDetails)&&(identical(other.allowRetry, allowRetry) || other.allowRetry == allowRetry));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadingError&&(identical(other.message, message) || other.message == message)&&(identical(other.technicalDetails, technicalDetails) || other.technicalDetails == technicalDetails)&&(identical(other.allowRetry, allowRetry) || other.allowRetry == allowRetry));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,message,technicalDetails,allowRetry);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,message,technicalDetails,allowRetry);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadingError(message: $message, technicalDetails: $technicalDetails, allowRetry: $allowRetry)';
|
||||
return 'LoadingError(message: $message, technicalDetails: $technicalDetails, allowRetry: $allowRetry)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
+16
-8
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'loadable_save_context.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'loadable_save_context.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $LoadableSaveContextCopyWith<LoadableSaveContext> get copyWith => _$LoadableSave
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableSaveContext&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp));
|
||||
final _this = this as LoadableSaveContext;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoadableSaveContext&&(identical(other.timestamp, _this.timestamp) || other.timestamp == _this.timestamp));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,timestamp);
|
||||
int get hashCode {
|
||||
final _this = this as LoadableSaveContext;
|
||||
return Object.hash(runtimeType,_this.timestamp);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadableSaveContext(timestamp: $timestamp)';
|
||||
final _this = this as LoadableSaveContext;
|
||||
return 'LoadableSaveContext(timestamp: ${_this.timestamp})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$LoadableSaveContextCopyWithImpl<$Res>
|
||||
/// Create a copy of LoadableSaveContext
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? timestamp = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(LoadableSaveContext(
|
||||
timestamp: null == timestamp ? _self.timestamp : timestamp // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
@@ -227,16 +233,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableSaveContext&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoadableSaveContext&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,timestamp);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,timestamp);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoadableSaveContext(timestamp: $timestamp)';
|
||||
return 'LoadableSaveContext(timestamp: $timestamp)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'breaker_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'breaker_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $BreakerStateCopyWith<BreakerState> get copyWith => _$BreakerStateCopyWithImpl<B
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BreakerState&&(identical(other.response, response) || other.response == response));
|
||||
final _this = this as BreakerState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BreakerState&&(identical(other.response, _this.response) || other.response == _this.response));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,response);
|
||||
int get hashCode {
|
||||
final _this = this as BreakerState;
|
||||
return Object.hash(runtimeType,_this.response);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BreakerState(response: $response)';
|
||||
final _this = this as BreakerState;
|
||||
return 'BreakerState(response: ${_this.response})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$BreakerStateCopyWithImpl<$Res>
|
||||
/// Create a copy of BreakerState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? response = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(BreakerState(
|
||||
response: freezed == response ? _self.response : response // ignore: cast_nullable_to_non_nullable
|
||||
as GetBreakersResponse?,
|
||||
));
|
||||
@@ -227,16 +233,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BreakerState&&(identical(other.response, response) || other.response == response));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BreakerState&&(identical(other.response, response) || other.response == response));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,response);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,response);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BreakerState(response: $response)';
|
||||
return 'BreakerState(response: $response)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'capabilities_state.dart';
|
||||
@@ -9,19 +9,14 @@ part of 'capabilities_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CapabilitiesState {
|
||||
|
||||
bool get viewForeignTimetables; bool get pushNotifications;// Days into the past/future the timetable may be scrolled. Null = no
|
||||
// client-side clamp; the (server-narrowed) school year alone governs.
|
||||
int? get timetablePastDays; int? get timetableFutureDays;// LDAP user type ('TEACHER' | 'STUDENT' | 'STAFF'); null = unknown.
|
||||
String? get userType;// Whether a capability response (or a definitive failure) has been
|
||||
// observed at least once this session. Lets the UI distinguish "still
|
||||
// unknown" from "confirmed not allowed".
|
||||
bool get loaded;
|
||||
bool get viewForeignTimetables; bool get pushNotifications; int? get timetablePastDays; int? get timetableFutureDays; String? get userType; bool get loaded;
|
||||
/// Create a copy of CapabilitiesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -34,16 +29,21 @@ $CapabilitiesStateCopyWith<CapabilitiesState> get copyWith => _$CapabilitiesStat
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CapabilitiesState&&(identical(other.viewForeignTimetables, viewForeignTimetables) || other.viewForeignTimetables == viewForeignTimetables)&&(identical(other.pushNotifications, pushNotifications) || other.pushNotifications == pushNotifications)&&(identical(other.timetablePastDays, timetablePastDays) || other.timetablePastDays == timetablePastDays)&&(identical(other.timetableFutureDays, timetableFutureDays) || other.timetableFutureDays == timetableFutureDays)&&(identical(other.userType, userType) || other.userType == userType)&&(identical(other.loaded, loaded) || other.loaded == loaded));
|
||||
final _this = this as CapabilitiesState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CapabilitiesState&&(identical(other.viewForeignTimetables, _this.viewForeignTimetables) || other.viewForeignTimetables == _this.viewForeignTimetables)&&(identical(other.pushNotifications, _this.pushNotifications) || other.pushNotifications == _this.pushNotifications)&&(identical(other.timetablePastDays, _this.timetablePastDays) || other.timetablePastDays == _this.timetablePastDays)&&(identical(other.timetableFutureDays, _this.timetableFutureDays) || other.timetableFutureDays == _this.timetableFutureDays)&&(identical(other.userType, _this.userType) || other.userType == _this.userType)&&(identical(other.loaded, _this.loaded) || other.loaded == _this.loaded));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,viewForeignTimetables,pushNotifications,timetablePastDays,timetableFutureDays,userType,loaded);
|
||||
int get hashCode {
|
||||
final _this = this as CapabilitiesState;
|
||||
return Object.hash(runtimeType,_this.viewForeignTimetables,_this.pushNotifications,_this.timetablePastDays,_this.timetableFutureDays,_this.userType,_this.loaded);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CapabilitiesState(viewForeignTimetables: $viewForeignTimetables, pushNotifications: $pushNotifications, timetablePastDays: $timetablePastDays, timetableFutureDays: $timetableFutureDays, userType: $userType, loaded: $loaded)';
|
||||
final _this = this as CapabilitiesState;
|
||||
return 'CapabilitiesState(viewForeignTimetables: ${_this.viewForeignTimetables}, pushNotifications: ${_this.pushNotifications}, timetablePastDays: ${_this.timetablePastDays}, timetableFutureDays: ${_this.timetableFutureDays}, userType: ${_this.userType}, loaded: ${_this.loaded})';
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class _$CapabilitiesStateCopyWithImpl<$Res>
|
||||
/// Create a copy of CapabilitiesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? viewForeignTimetables = null,Object? pushNotifications = null,Object? timetablePastDays = freezed,Object? timetableFutureDays = freezed,Object? userType = freezed,Object? loaded = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(CapabilitiesState(
|
||||
viewForeignTimetables: null == viewForeignTimetables ? _self.viewForeignTimetables : viewForeignTimetables // ignore: cast_nullable_to_non_nullable
|
||||
as bool,pushNotifications: null == pushNotifications ? _self.pushNotifications : pushNotifications // ignore: cast_nullable_to_non_nullable
|
||||
as bool,timetablePastDays: freezed == timetablePastDays ? _self.timetablePastDays : timetablePastDays // ignore: cast_nullable_to_non_nullable
|
||||
@@ -225,15 +225,9 @@ class _CapabilitiesState implements CapabilitiesState {
|
||||
|
||||
@override@JsonKey() final bool viewForeignTimetables;
|
||||
@override@JsonKey() final bool pushNotifications;
|
||||
// Days into the past/future the timetable may be scrolled. Null = no
|
||||
// client-side clamp; the (server-narrowed) school year alone governs.
|
||||
@override final int? timetablePastDays;
|
||||
@override final int? timetableFutureDays;
|
||||
// LDAP user type ('TEACHER' | 'STUDENT' | 'STAFF'); null = unknown.
|
||||
@override final String? userType;
|
||||
// Whether a capability response (or a definitive failure) has been
|
||||
// observed at least once this session. Lets the UI distinguish "still
|
||||
// unknown" from "confirmed not allowed".
|
||||
@override@JsonKey() final bool loaded;
|
||||
|
||||
/// Create a copy of CapabilitiesState
|
||||
@@ -249,16 +243,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CapabilitiesState&&(identical(other.viewForeignTimetables, viewForeignTimetables) || other.viewForeignTimetables == viewForeignTimetables)&&(identical(other.pushNotifications, pushNotifications) || other.pushNotifications == pushNotifications)&&(identical(other.timetablePastDays, timetablePastDays) || other.timetablePastDays == timetablePastDays)&&(identical(other.timetableFutureDays, timetableFutureDays) || other.timetableFutureDays == timetableFutureDays)&&(identical(other.userType, userType) || other.userType == userType)&&(identical(other.loaded, loaded) || other.loaded == loaded));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CapabilitiesState&&(identical(other.viewForeignTimetables, viewForeignTimetables) || other.viewForeignTimetables == viewForeignTimetables)&&(identical(other.pushNotifications, pushNotifications) || other.pushNotifications == pushNotifications)&&(identical(other.timetablePastDays, timetablePastDays) || other.timetablePastDays == timetablePastDays)&&(identical(other.timetableFutureDays, timetableFutureDays) || other.timetableFutureDays == timetableFutureDays)&&(identical(other.userType, userType) || other.userType == userType)&&(identical(other.loaded, loaded) || other.loaded == loaded));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,viewForeignTimetables,pushNotifications,timetablePastDays,timetableFutureDays,userType,loaded);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,viewForeignTimetables,pushNotifications,timetablePastDays,timetableFutureDays,userType,loaded);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CapabilitiesState(viewForeignTimetables: $viewForeignTimetables, pushNotifications: $pushNotifications, timetablePastDays: $timetablePastDays, timetableFutureDays: $timetableFutureDays, userType: $userType, loaded: $loaded)';
|
||||
return 'CapabilitiesState(viewForeignTimetables: $viewForeignTimetables, pushNotifications: $pushNotifications, timetablePastDays: $timetablePastDays, timetableFutureDays: $timetableFutureDays, userType: $userType, loaded: $loaded)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'chat_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'chat_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $ChatStateCopyWith<ChatState> get copyWith => _$ChatStateCopyWithImpl<ChatState>
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChatState&&(identical(other.currentToken, currentToken) || other.currentToken == currentToken)&&(identical(other.chatResponse, chatResponse) || other.chatResponse == chatResponse)&&(identical(other.referenceMessageId, referenceMessageId) || other.referenceMessageId == referenceMessageId)&&(identical(other.hasMoreOld, hasMoreOld) || other.hasMoreOld == hasMoreOld)&&(identical(other.isLoadingOlder, isLoadingOlder) || other.isLoadingOlder == isLoadingOlder));
|
||||
final _this = this as ChatState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChatState&&(identical(other.currentToken, _this.currentToken) || other.currentToken == _this.currentToken)&&(identical(other.chatResponse, _this.chatResponse) || other.chatResponse == _this.chatResponse)&&(identical(other.referenceMessageId, _this.referenceMessageId) || other.referenceMessageId == _this.referenceMessageId)&&(identical(other.hasMoreOld, _this.hasMoreOld) || other.hasMoreOld == _this.hasMoreOld)&&(identical(other.isLoadingOlder, _this.isLoadingOlder) || other.isLoadingOlder == _this.isLoadingOlder));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,currentToken,chatResponse,referenceMessageId,hasMoreOld,isLoadingOlder);
|
||||
int get hashCode {
|
||||
final _this = this as ChatState;
|
||||
return Object.hash(runtimeType,_this.currentToken,_this.chatResponse,_this.referenceMessageId,_this.hasMoreOld,_this.isLoadingOlder);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatState(currentToken: $currentToken, chatResponse: $chatResponse, referenceMessageId: $referenceMessageId, hasMoreOld: $hasMoreOld, isLoadingOlder: $isLoadingOlder)';
|
||||
final _this = this as ChatState;
|
||||
return 'ChatState(currentToken: ${_this.currentToken}, chatResponse: ${_this.chatResponse}, referenceMessageId: ${_this.referenceMessageId}, hasMoreOld: ${_this.hasMoreOld}, isLoadingOlder: ${_this.isLoadingOlder})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$ChatStateCopyWithImpl<$Res>
|
||||
/// Create a copy of ChatState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? currentToken = null,Object? chatResponse = freezed,Object? referenceMessageId = freezed,Object? hasMoreOld = null,Object? isLoadingOlder = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(ChatState(
|
||||
currentToken: null == currentToken ? _self.currentToken : currentToken // ignore: cast_nullable_to_non_nullable
|
||||
as String,chatResponse: freezed == chatResponse ? _self.chatResponse : chatResponse // ignore: cast_nullable_to_non_nullable
|
||||
as GetChatResponse?,referenceMessageId: freezed == referenceMessageId ? _self.referenceMessageId : referenceMessageId // ignore: cast_nullable_to_non_nullable
|
||||
@@ -235,16 +241,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChatState&&(identical(other.currentToken, currentToken) || other.currentToken == currentToken)&&(identical(other.chatResponse, chatResponse) || other.chatResponse == chatResponse)&&(identical(other.referenceMessageId, referenceMessageId) || other.referenceMessageId == referenceMessageId)&&(identical(other.hasMoreOld, hasMoreOld) || other.hasMoreOld == hasMoreOld)&&(identical(other.isLoadingOlder, isLoadingOlder) || other.isLoadingOlder == isLoadingOlder));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChatState&&(identical(other.currentToken, currentToken) || other.currentToken == currentToken)&&(identical(other.chatResponse, chatResponse) || other.chatResponse == chatResponse)&&(identical(other.referenceMessageId, referenceMessageId) || other.referenceMessageId == referenceMessageId)&&(identical(other.hasMoreOld, hasMoreOld) || other.hasMoreOld == hasMoreOld)&&(identical(other.isLoadingOlder, isLoadingOlder) || other.isLoadingOlder == isLoadingOlder));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,currentToken,chatResponse,referenceMessageId,hasMoreOld,isLoadingOlder);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,currentToken,chatResponse,referenceMessageId,hasMoreOld,isLoadingOlder);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatState(currentToken: $currentToken, chatResponse: $chatResponse, referenceMessageId: $referenceMessageId, hasMoreOld: $hasMoreOld, isLoadingOlder: $isLoadingOlder)';
|
||||
return 'ChatState(currentToken: $currentToken, chatResponse: $chatResponse, referenceMessageId: $referenceMessageId, hasMoreOld: $hasMoreOld, isLoadingOlder: $isLoadingOlder)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'chat_list_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'chat_list_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $ChatListStateCopyWith<ChatListState> get copyWith => _$ChatListStateCopyWithImp
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChatListState&&(identical(other.rooms, rooms) || other.rooms == rooms));
|
||||
final _this = this as ChatListState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChatListState&&(identical(other.rooms, _this.rooms) || other.rooms == _this.rooms));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,rooms);
|
||||
int get hashCode {
|
||||
final _this = this as ChatListState;
|
||||
return Object.hash(runtimeType,_this.rooms);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatListState(rooms: $rooms)';
|
||||
final _this = this as ChatListState;
|
||||
return 'ChatListState(rooms: ${_this.rooms})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$ChatListStateCopyWithImpl<$Res>
|
||||
/// Create a copy of ChatListState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? rooms = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(ChatListState(
|
||||
rooms: freezed == rooms ? _self.rooms : rooms // ignore: cast_nullable_to_non_nullable
|
||||
as GetRoomResponse?,
|
||||
));
|
||||
@@ -227,16 +233,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChatListState&&(identical(other.rooms, rooms) || other.rooms == rooms));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChatListState&&(identical(other.rooms, rooms) || other.rooms == rooms));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,rooms);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,rooms);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatListState(rooms: $rooms)';
|
||||
return 'ChatListState(rooms: $rooms)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'files_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'files_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $FilesStateCopyWith<FilesState> get copyWith => _$FilesStateCopyWithImpl<FilesSt
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is FilesState&&const DeepCollectionEquality().equals(other.currentPath, currentPath)&&(identical(other.listing, listing) || other.listing == listing));
|
||||
final _this = this as FilesState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is FilesState&&const DeepCollectionEquality().equals(other.currentPath, _this.currentPath)&&(identical(other.listing, _this.listing) || other.listing == _this.listing));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(currentPath),listing);
|
||||
int get hashCode {
|
||||
final _this = this as FilesState;
|
||||
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_this.currentPath),_this.listing);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FilesState(currentPath: $currentPath, listing: $listing)';
|
||||
final _this = this as FilesState;
|
||||
return 'FilesState(currentPath: ${_this.currentPath}, listing: ${_this.listing})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$FilesStateCopyWithImpl<$Res>
|
||||
/// Create a copy of FilesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? currentPath = null,Object? listing = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(FilesState(
|
||||
currentPath: null == currentPath ? _self.currentPath : currentPath // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,listing: freezed == listing ? _self.listing : listing // ignore: cast_nullable_to_non_nullable
|
||||
as ListFilesResponse?,
|
||||
@@ -210,7 +216,7 @@ return $default(_that.currentPath,_that.listing);case _:
|
||||
@JsonSerializable()
|
||||
|
||||
class _FilesState implements FilesState {
|
||||
const _FilesState({final List<String> currentPath = const <String>[], this.listing}): _currentPath = currentPath;
|
||||
const _FilesState({ List<String> currentPath = const <String>[], this.listing}): _currentPath = currentPath;
|
||||
factory _FilesState.fromJson(Map<String, dynamic> json) => _$FilesStateFromJson(json);
|
||||
|
||||
final List<String> _currentPath;
|
||||
@@ -235,16 +241,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _FilesState&&const DeepCollectionEquality().equals(other._currentPath, _currentPath)&&(identical(other.listing, listing) || other.listing == listing));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _FilesState&&const DeepCollectionEquality().equals(other.currentPath, _currentPath)&&(identical(other.listing, listing) || other.listing == listing));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_currentPath),listing);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_currentPath),listing);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FilesState(currentPath: $currentPath, listing: $listing)';
|
||||
return 'FilesState(currentPath: $currentPath, listing: $listing)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'grade_averages_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'grade_averages_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $GradeAveragesStateCopyWith<GradeAveragesState> get copyWith => _$GradeAveragesS
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GradeAveragesState&&(identical(other.gradingSystem, gradingSystem) || other.gradingSystem == gradingSystem)&&const DeepCollectionEquality().equals(other.grades, grades));
|
||||
final _this = this as GradeAveragesState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is GradeAveragesState&&(identical(other.gradingSystem, _this.gradingSystem) || other.gradingSystem == _this.gradingSystem)&&const DeepCollectionEquality().equals(other.grades, _this.grades));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,gradingSystem,const DeepCollectionEquality().hash(grades));
|
||||
int get hashCode {
|
||||
final _this = this as GradeAveragesState;
|
||||
return Object.hash(runtimeType,_this.gradingSystem,const DeepCollectionEquality().hash(_this.grades));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GradeAveragesState(gradingSystem: $gradingSystem, grades: $grades)';
|
||||
final _this = this as GradeAveragesState;
|
||||
return 'GradeAveragesState(gradingSystem: ${_this.gradingSystem}, grades: ${_this.grades})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$GradeAveragesStateCopyWithImpl<$Res>
|
||||
/// Create a copy of GradeAveragesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? gradingSystem = null,Object? grades = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(GradeAveragesState(
|
||||
gradingSystem: null == gradingSystem ? _self.gradingSystem : gradingSystem // ignore: cast_nullable_to_non_nullable
|
||||
as GradeAveragesGradingSystem,grades: null == grades ? _self.grades : grades // ignore: cast_nullable_to_non_nullable
|
||||
as List<int>,
|
||||
@@ -210,7 +216,7 @@ return $default(_that.gradingSystem,_that.grades);case _:
|
||||
@JsonSerializable()
|
||||
|
||||
class _GradeAveragesState implements GradeAveragesState {
|
||||
const _GradeAveragesState({required this.gradingSystem, required final List<int> grades}): _grades = grades;
|
||||
const _GradeAveragesState({required this.gradingSystem, required List<int> grades}): _grades = grades;
|
||||
factory _GradeAveragesState.fromJson(Map<String, dynamic> json) => _$GradeAveragesStateFromJson(json);
|
||||
|
||||
@override final GradeAveragesGradingSystem gradingSystem;
|
||||
@@ -235,16 +241,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GradeAveragesState&&(identical(other.gradingSystem, gradingSystem) || other.gradingSystem == gradingSystem)&&const DeepCollectionEquality().equals(other._grades, _grades));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GradeAveragesState&&(identical(other.gradingSystem, gradingSystem) || other.gradingSystem == gradingSystem)&&const DeepCollectionEquality().equals(other.grades, _grades));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,gradingSystem,const DeepCollectionEquality().hash(_grades));
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,gradingSystem,const DeepCollectionEquality().hash(_grades));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GradeAveragesState(gradingSystem: $gradingSystem, grades: $grades)';
|
||||
return 'GradeAveragesState(gradingSystem: $gradingSystem, grades: $grades)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'holidays_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'holidays_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -27,23 +28,29 @@ $HolidaysStateCopyWith<HolidaysState> get copyWith => _$HolidaysStateCopyWithImp
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
final _this = this as HolidaysState;
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'HolidaysState'))
|
||||
..add(DiagnosticsProperty('showPastHolidays', showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', showDisclaimer))..add(DiagnosticsProperty('holidays', holidays));
|
||||
..add(DiagnosticsProperty('showPastHolidays', _this.showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', _this.showDisclaimer))..add(DiagnosticsProperty('holidays', _this.holidays));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other.holidays, holidays));
|
||||
final _this = this as HolidaysState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is HolidaysState&&(identical(other.showPastHolidays, _this.showPastHolidays) || other.showPastHolidays == _this.showPastHolidays)&&(identical(other.showDisclaimer, _this.showDisclaimer) || other.showDisclaimer == _this.showDisclaimer)&&const DeepCollectionEquality().equals(other.holidays, _this.holidays));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(holidays));
|
||||
int get hashCode {
|
||||
final _this = this as HolidaysState;
|
||||
return Object.hash(runtimeType,_this.showPastHolidays,_this.showDisclaimer,const DeepCollectionEquality().hash(_this.holidays));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
||||
return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)';
|
||||
final _this = this as HolidaysState;
|
||||
return 'HolidaysState(showPastHolidays: ${_this.showPastHolidays}, showDisclaimer: ${_this.showDisclaimer}, holidays: ${_this.holidays})';
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +79,7 @@ class _$HolidaysStateCopyWithImpl<$Res>
|
||||
/// Create a copy of HolidaysState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? showPastHolidays = null,Object? showDisclaimer = null,Object? holidays = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(HolidaysState(
|
||||
showPastHolidays: null == showPastHolidays ? _self.showPastHolidays : showPastHolidays // ignore: cast_nullable_to_non_nullable
|
||||
as bool,showDisclaimer: null == showDisclaimer ? _self.showDisclaimer : showDisclaimer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||
@@ -217,7 +224,7 @@ return $default(_that.showPastHolidays,_that.showDisclaimer,_that.holidays);case
|
||||
@JsonSerializable()
|
||||
|
||||
class _HolidaysState with DiagnosticableTreeMixin implements HolidaysState {
|
||||
const _HolidaysState({required this.showPastHolidays, required this.showDisclaimer, required final List<McHoliday> holidays}): _holidays = holidays;
|
||||
const _HolidaysState({required this.showPastHolidays, required this.showDisclaimer, required List<McHoliday> holidays}): _holidays = holidays;
|
||||
factory _HolidaysState.fromJson(Map<String, dynamic> json) => _$HolidaysStateFromJson(json);
|
||||
|
||||
@override final bool showPastHolidays;
|
||||
@@ -242,23 +249,25 @@ Map<String, dynamic> toJson() {
|
||||
}
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
properties
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'HolidaysState'))
|
||||
..add(DiagnosticsProperty('showPastHolidays', showPastHolidays))..add(DiagnosticsProperty('showDisclaimer', showDisclaimer))..add(DiagnosticsProperty('holidays', holidays));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other._holidays, _holidays));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HolidaysState&&(identical(other.showPastHolidays, showPastHolidays) || other.showPastHolidays == showPastHolidays)&&(identical(other.showDisclaimer, showDisclaimer) || other.showDisclaimer == showDisclaimer)&&const DeepCollectionEquality().equals(other.holidays, _holidays));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(_holidays));
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,showPastHolidays,showDisclaimer,const DeepCollectionEquality().hash(_holidays));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
||||
return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)';
|
||||
return 'HolidaysState(showPastHolidays: $showPastHolidays, showDisclaimer: $showDisclaimer, holidays: $holidays)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'marianum_dates_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'marianum_dates_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -27,23 +28,29 @@ $MarianumDatesStateCopyWith<MarianumDatesState> get copyWith => _$MarianumDatesS
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
final _this = this as MarianumDatesState;
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'MarianumDatesState'))
|
||||
..add(DiagnosticsProperty('showPastEvents', showPastEvents))..add(DiagnosticsProperty('events', events));
|
||||
..add(DiagnosticsProperty('showPastEvents', _this.showPastEvents))..add(DiagnosticsProperty('events', _this.events));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumDatesState&&(identical(other.showPastEvents, showPastEvents) || other.showPastEvents == showPastEvents)&&const DeepCollectionEquality().equals(other.events, events));
|
||||
final _this = this as MarianumDatesState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumDatesState&&(identical(other.showPastEvents, _this.showPastEvents) || other.showPastEvents == _this.showPastEvents)&&const DeepCollectionEquality().equals(other.events, _this.events));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,showPastEvents,const DeepCollectionEquality().hash(events));
|
||||
int get hashCode {
|
||||
final _this = this as MarianumDatesState;
|
||||
return Object.hash(runtimeType,_this.showPastEvents,const DeepCollectionEquality().hash(_this.events));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
||||
return 'MarianumDatesState(showPastEvents: $showPastEvents, events: $events)';
|
||||
final _this = this as MarianumDatesState;
|
||||
return 'MarianumDatesState(showPastEvents: ${_this.showPastEvents}, events: ${_this.events})';
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +79,7 @@ class _$MarianumDatesStateCopyWithImpl<$Res>
|
||||
/// Create a copy of MarianumDatesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? showPastEvents = null,Object? events = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(MarianumDatesState(
|
||||
showPastEvents: null == showPastEvents ? _self.showPastEvents : showPastEvents // ignore: cast_nullable_to_non_nullable
|
||||
as bool,events: null == events ? _self.events : events // ignore: cast_nullable_to_non_nullable
|
||||
as List<MarianumDate>,
|
||||
@@ -216,7 +223,7 @@ return $default(_that.showPastEvents,_that.events);case _:
|
||||
@JsonSerializable()
|
||||
|
||||
class _MarianumDatesState with DiagnosticableTreeMixin implements MarianumDatesState {
|
||||
const _MarianumDatesState({required this.showPastEvents, required final List<MarianumDate> events}): _events = events;
|
||||
const _MarianumDatesState({required this.showPastEvents, required List<MarianumDate> events}): _events = events;
|
||||
factory _MarianumDatesState.fromJson(Map<String, dynamic> json) => _$MarianumDatesStateFromJson(json);
|
||||
|
||||
@override final bool showPastEvents;
|
||||
@@ -240,23 +247,25 @@ Map<String, dynamic> toJson() {
|
||||
}
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
properties
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'MarianumDatesState'))
|
||||
..add(DiagnosticsProperty('showPastEvents', showPastEvents))..add(DiagnosticsProperty('events', events));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumDatesState&&(identical(other.showPastEvents, showPastEvents) || other.showPastEvents == showPastEvents)&&const DeepCollectionEquality().equals(other._events, _events));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumDatesState&&(identical(other.showPastEvents, showPastEvents) || other.showPastEvents == showPastEvents)&&const DeepCollectionEquality().equals(other.events, _events));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,showPastEvents,const DeepCollectionEquality().hash(_events));
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,showPastEvents,const DeepCollectionEquality().hash(_events));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
||||
return 'MarianumDatesState(showPastEvents: $showPastEvents, events: $events)';
|
||||
return 'MarianumDatesState(showPastEvents: $showPastEvents, events: $events)';
|
||||
}
|
||||
|
||||
|
||||
@@ -311,23 +320,29 @@ $MarianumDateCopyWith<MarianumDate> get copyWith => _$MarianumDateCopyWithImpl<M
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
final _this = this as MarianumDate;
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'MarianumDate'))
|
||||
..add(DiagnosticsProperty('uid', uid))..add(DiagnosticsProperty('title', title))..add(DiagnosticsProperty('description', description))..add(DiagnosticsProperty('start', start))..add(DiagnosticsProperty('end', end))..add(DiagnosticsProperty('isAllDay', isAllDay));
|
||||
..add(DiagnosticsProperty('uid', _this.uid))..add(DiagnosticsProperty('title', _this.title))..add(DiagnosticsProperty('description', _this.description))..add(DiagnosticsProperty('start', _this.start))..add(DiagnosticsProperty('end', _this.end))..add(DiagnosticsProperty('isAllDay', _this.isAllDay));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumDate&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.isAllDay, isAllDay) || other.isAllDay == isAllDay));
|
||||
final _this = this as MarianumDate;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumDate&&(identical(other.uid, _this.uid) || other.uid == _this.uid)&&(identical(other.title, _this.title) || other.title == _this.title)&&(identical(other.description, _this.description) || other.description == _this.description)&&(identical(other.start, _this.start) || other.start == _this.start)&&(identical(other.end, _this.end) || other.end == _this.end)&&(identical(other.isAllDay, _this.isAllDay) || other.isAllDay == _this.isAllDay));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,uid,title,description,start,end,isAllDay);
|
||||
int get hashCode {
|
||||
final _this = this as MarianumDate;
|
||||
return Object.hash(runtimeType,_this.uid,_this.title,_this.description,_this.start,_this.end,_this.isAllDay);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
||||
return 'MarianumDate(uid: $uid, title: $title, description: $description, start: $start, end: $end, isAllDay: $isAllDay)';
|
||||
final _this = this as MarianumDate;
|
||||
return 'MarianumDate(uid: ${_this.uid}, title: ${_this.title}, description: ${_this.description}, start: ${_this.start}, end: ${_this.end}, isAllDay: ${_this.isAllDay})';
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +371,7 @@ class _$MarianumDateCopyWithImpl<$Res>
|
||||
/// Create a copy of MarianumDate
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? uid = null,Object? title = null,Object? description = freezed,Object? start = null,Object? end = null,Object? isAllDay = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(MarianumDate(
|
||||
uid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable
|
||||
as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -526,23 +541,25 @@ Map<String, dynamic> toJson() {
|
||||
}
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
properties
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'MarianumDate'))
|
||||
..add(DiagnosticsProperty('uid', uid))..add(DiagnosticsProperty('title', title))..add(DiagnosticsProperty('description', description))..add(DiagnosticsProperty('start', start))..add(DiagnosticsProperty('end', end))..add(DiagnosticsProperty('isAllDay', isAllDay));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumDate&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.isAllDay, isAllDay) || other.isAllDay == isAllDay));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumDate&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.start, start) || other.start == start)&&(identical(other.end, end) || other.end == end)&&(identical(other.isAllDay, isAllDay) || other.isAllDay == isAllDay));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,uid,title,description,start,end,isAllDay);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,uid,title,description,start,end,isAllDay);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
||||
return 'MarianumDate(uid: $uid, title: $title, description: $description, start: $start, end: $end, isAllDay: $isAllDay)';
|
||||
return 'MarianumDate(uid: $uid, title: $title, description: $description, start: $start, end: $end, isAllDay: $isAllDay)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'marianum_message_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'marianum_message_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $MarianumMessageStateCopyWith<MarianumMessageState> get copyWith => _$MarianumMe
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessageState&&(identical(other.messageList, messageList) || other.messageList == messageList));
|
||||
final _this = this as MarianumMessageState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessageState&&(identical(other.messageList, _this.messageList) || other.messageList == _this.messageList));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,messageList);
|
||||
int get hashCode {
|
||||
final _this = this as MarianumMessageState;
|
||||
return Object.hash(runtimeType,_this.messageList);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MarianumMessageState(messageList: $messageList)';
|
||||
final _this = this as MarianumMessageState;
|
||||
return 'MarianumMessageState(messageList: ${_this.messageList})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$MarianumMessageStateCopyWithImpl<$Res>
|
||||
/// Create a copy of MarianumMessageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? messageList = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(MarianumMessageState(
|
||||
messageList: null == messageList ? _self.messageList : messageList // ignore: cast_nullable_to_non_nullable
|
||||
as MarianumMessageList,
|
||||
));
|
||||
@@ -236,16 +242,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessageState&&(identical(other.messageList, messageList) || other.messageList == messageList));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessageState&&(identical(other.messageList, messageList) || other.messageList == messageList));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,messageList);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,messageList);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MarianumMessageState(messageList: $messageList)';
|
||||
return 'MarianumMessageState(messageList: $messageList)';
|
||||
}
|
||||
|
||||
|
||||
@@ -309,16 +317,21 @@ $MarianumMessageListCopyWith<MarianumMessageList> get copyWith => _$MarianumMess
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessageList&&(identical(other.base, base) || other.base == base)&&const DeepCollectionEquality().equals(other.messages, messages));
|
||||
final _this = this as MarianumMessageList;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessageList&&(identical(other.base, _this.base) || other.base == _this.base)&&const DeepCollectionEquality().equals(other.messages, _this.messages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,base,const DeepCollectionEquality().hash(messages));
|
||||
int get hashCode {
|
||||
final _this = this as MarianumMessageList;
|
||||
return Object.hash(runtimeType,_this.base,const DeepCollectionEquality().hash(_this.messages));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MarianumMessageList(base: $base, messages: $messages)';
|
||||
final _this = this as MarianumMessageList;
|
||||
return 'MarianumMessageList(base: ${_this.base}, messages: ${_this.messages})';
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +360,7 @@ class _$MarianumMessageListCopyWithImpl<$Res>
|
||||
/// Create a copy of MarianumMessageList
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? base = null,Object? messages = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(MarianumMessageList(
|
||||
base: null == base ? _self.base : base // ignore: cast_nullable_to_non_nullable
|
||||
as String,messages: null == messages ? _self.messages : messages // ignore: cast_nullable_to_non_nullable
|
||||
as List<MarianumMessage>,
|
||||
@@ -491,7 +504,7 @@ return $default(_that.base,_that.messages);case _:
|
||||
@JsonSerializable()
|
||||
|
||||
class _MarianumMessageList implements MarianumMessageList {
|
||||
const _MarianumMessageList({required this.base, required final List<MarianumMessage> messages}): _messages = messages;
|
||||
const _MarianumMessageList({required this.base, required List<MarianumMessage> messages}): _messages = messages;
|
||||
factory _MarianumMessageList.fromJson(Map<String, dynamic> json) => _$MarianumMessageListFromJson(json);
|
||||
|
||||
@override final String base;
|
||||
@@ -516,16 +529,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessageList&&(identical(other.base, base) || other.base == base)&&const DeepCollectionEquality().equals(other._messages, _messages));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessageList&&(identical(other.base, base) || other.base == base)&&const DeepCollectionEquality().equals(other.messages, _messages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,base,const DeepCollectionEquality().hash(_messages));
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,base,const DeepCollectionEquality().hash(_messages));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MarianumMessageList(base: $base, messages: $messages)';
|
||||
return 'MarianumMessageList(base: $base, messages: $messages)';
|
||||
}
|
||||
|
||||
|
||||
@@ -581,16 +596,21 @@ $MarianumMessageCopyWith<MarianumMessage> get copyWith => _$MarianumMessageCopyW
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.date, date) || other.date == date)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url));
|
||||
final _this = this as MarianumMessage;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarianumMessage&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.name, _this.name) || other.name == _this.name)&&(identical(other.date, _this.date) || other.date == _this.date)&&(identical(other.description, _this.description) || other.description == _this.description)&&(identical(other.url, _this.url) || other.url == _this.url));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,date,description,url);
|
||||
int get hashCode {
|
||||
final _this = this as MarianumMessage;
|
||||
return Object.hash(runtimeType,_this.id,_this.name,_this.date,_this.description,_this.url);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MarianumMessage(id: $id, name: $name, date: $date, description: $description, url: $url)';
|
||||
final _this = this as MarianumMessage;
|
||||
return 'MarianumMessage(id: ${_this.id}, name: ${_this.name}, date: ${_this.date}, description: ${_this.description}, url: ${_this.url})';
|
||||
}
|
||||
|
||||
|
||||
@@ -619,7 +639,7 @@ class _$MarianumMessageCopyWithImpl<$Res>
|
||||
/// Create a copy of MarianumMessage
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? date = null,Object? description = null,Object? url = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(MarianumMessage(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
@@ -788,16 +808,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.date, date) || other.date == date)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarianumMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.date, date) || other.date == date)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,date,description,url);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,id,name,date,description,url);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MarianumMessage(id: $id, name: $name, date: $date, description: $description, url: $url)';
|
||||
return 'MarianumMessage(id: $id, name: $name, date: $date, description: $description, url: $url)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
+17
-13
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'nextcloud_capabilities_state.dart';
|
||||
@@ -9,15 +9,14 @@ part of 'nextcloud_capabilities_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$NextcloudCapabilitiesState {
|
||||
|
||||
bool get apiEnabled; bool get publicEnabled; bool get publicMultipleLinks; bool get publicUploadEnabled; bool get publicPasswordEnforced; bool get publicExpireEnabled; int? get publicExpireDays; bool get publicExpireEnforced; bool get groupEnabled; bool get resharing; int? get passwordMinLength; bool get passwordEnforceUpperLower; bool get passwordEnforceNumeric; bool get passwordEnforceSpecial;// Whether a capability response (or a definitive failure) has been observed
|
||||
// at least once this session.
|
||||
bool get loaded;
|
||||
bool get apiEnabled; bool get publicEnabled; bool get publicMultipleLinks; bool get publicUploadEnabled; bool get publicPasswordEnforced; bool get publicExpireEnabled; int? get publicExpireDays; bool get publicExpireEnforced; bool get groupEnabled; bool get resharing; int? get passwordMinLength; bool get passwordEnforceUpperLower; bool get passwordEnforceNumeric; bool get passwordEnforceSpecial; bool get loaded;
|
||||
/// Create a copy of NextcloudCapabilitiesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -30,16 +29,21 @@ $NextcloudCapabilitiesStateCopyWith<NextcloudCapabilitiesState> get copyWith =>
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is NextcloudCapabilitiesState&&(identical(other.apiEnabled, apiEnabled) || other.apiEnabled == apiEnabled)&&(identical(other.publicEnabled, publicEnabled) || other.publicEnabled == publicEnabled)&&(identical(other.publicMultipleLinks, publicMultipleLinks) || other.publicMultipleLinks == publicMultipleLinks)&&(identical(other.publicUploadEnabled, publicUploadEnabled) || other.publicUploadEnabled == publicUploadEnabled)&&(identical(other.publicPasswordEnforced, publicPasswordEnforced) || other.publicPasswordEnforced == publicPasswordEnforced)&&(identical(other.publicExpireEnabled, publicExpireEnabled) || other.publicExpireEnabled == publicExpireEnabled)&&(identical(other.publicExpireDays, publicExpireDays) || other.publicExpireDays == publicExpireDays)&&(identical(other.publicExpireEnforced, publicExpireEnforced) || other.publicExpireEnforced == publicExpireEnforced)&&(identical(other.groupEnabled, groupEnabled) || other.groupEnabled == groupEnabled)&&(identical(other.resharing, resharing) || other.resharing == resharing)&&(identical(other.passwordMinLength, passwordMinLength) || other.passwordMinLength == passwordMinLength)&&(identical(other.passwordEnforceUpperLower, passwordEnforceUpperLower) || other.passwordEnforceUpperLower == passwordEnforceUpperLower)&&(identical(other.passwordEnforceNumeric, passwordEnforceNumeric) || other.passwordEnforceNumeric == passwordEnforceNumeric)&&(identical(other.passwordEnforceSpecial, passwordEnforceSpecial) || other.passwordEnforceSpecial == passwordEnforceSpecial)&&(identical(other.loaded, loaded) || other.loaded == loaded));
|
||||
final _this = this as NextcloudCapabilitiesState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is NextcloudCapabilitiesState&&(identical(other.apiEnabled, _this.apiEnabled) || other.apiEnabled == _this.apiEnabled)&&(identical(other.publicEnabled, _this.publicEnabled) || other.publicEnabled == _this.publicEnabled)&&(identical(other.publicMultipleLinks, _this.publicMultipleLinks) || other.publicMultipleLinks == _this.publicMultipleLinks)&&(identical(other.publicUploadEnabled, _this.publicUploadEnabled) || other.publicUploadEnabled == _this.publicUploadEnabled)&&(identical(other.publicPasswordEnforced, _this.publicPasswordEnforced) || other.publicPasswordEnforced == _this.publicPasswordEnforced)&&(identical(other.publicExpireEnabled, _this.publicExpireEnabled) || other.publicExpireEnabled == _this.publicExpireEnabled)&&(identical(other.publicExpireDays, _this.publicExpireDays) || other.publicExpireDays == _this.publicExpireDays)&&(identical(other.publicExpireEnforced, _this.publicExpireEnforced) || other.publicExpireEnforced == _this.publicExpireEnforced)&&(identical(other.groupEnabled, _this.groupEnabled) || other.groupEnabled == _this.groupEnabled)&&(identical(other.resharing, _this.resharing) || other.resharing == _this.resharing)&&(identical(other.passwordMinLength, _this.passwordMinLength) || other.passwordMinLength == _this.passwordMinLength)&&(identical(other.passwordEnforceUpperLower, _this.passwordEnforceUpperLower) || other.passwordEnforceUpperLower == _this.passwordEnforceUpperLower)&&(identical(other.passwordEnforceNumeric, _this.passwordEnforceNumeric) || other.passwordEnforceNumeric == _this.passwordEnforceNumeric)&&(identical(other.passwordEnforceSpecial, _this.passwordEnforceSpecial) || other.passwordEnforceSpecial == _this.passwordEnforceSpecial)&&(identical(other.loaded, _this.loaded) || other.loaded == _this.loaded));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,apiEnabled,publicEnabled,publicMultipleLinks,publicUploadEnabled,publicPasswordEnforced,publicExpireEnabled,publicExpireDays,publicExpireEnforced,groupEnabled,resharing,passwordMinLength,passwordEnforceUpperLower,passwordEnforceNumeric,passwordEnforceSpecial,loaded);
|
||||
int get hashCode {
|
||||
final _this = this as NextcloudCapabilitiesState;
|
||||
return Object.hash(runtimeType,_this.apiEnabled,_this.publicEnabled,_this.publicMultipleLinks,_this.publicUploadEnabled,_this.publicPasswordEnforced,_this.publicExpireEnabled,_this.publicExpireDays,_this.publicExpireEnforced,_this.groupEnabled,_this.resharing,_this.passwordMinLength,_this.passwordEnforceUpperLower,_this.passwordEnforceNumeric,_this.passwordEnforceSpecial,_this.loaded);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NextcloudCapabilitiesState(apiEnabled: $apiEnabled, publicEnabled: $publicEnabled, publicMultipleLinks: $publicMultipleLinks, publicUploadEnabled: $publicUploadEnabled, publicPasswordEnforced: $publicPasswordEnforced, publicExpireEnabled: $publicExpireEnabled, publicExpireDays: $publicExpireDays, publicExpireEnforced: $publicExpireEnforced, groupEnabled: $groupEnabled, resharing: $resharing, passwordMinLength: $passwordMinLength, passwordEnforceUpperLower: $passwordEnforceUpperLower, passwordEnforceNumeric: $passwordEnforceNumeric, passwordEnforceSpecial: $passwordEnforceSpecial, loaded: $loaded)';
|
||||
final _this = this as NextcloudCapabilitiesState;
|
||||
return 'NextcloudCapabilitiesState(apiEnabled: ${_this.apiEnabled}, publicEnabled: ${_this.publicEnabled}, publicMultipleLinks: ${_this.publicMultipleLinks}, publicUploadEnabled: ${_this.publicUploadEnabled}, publicPasswordEnforced: ${_this.publicPasswordEnforced}, publicExpireEnabled: ${_this.publicExpireEnabled}, publicExpireDays: ${_this.publicExpireDays}, publicExpireEnforced: ${_this.publicExpireEnforced}, groupEnabled: ${_this.groupEnabled}, resharing: ${_this.resharing}, passwordMinLength: ${_this.passwordMinLength}, passwordEnforceUpperLower: ${_this.passwordEnforceUpperLower}, passwordEnforceNumeric: ${_this.passwordEnforceNumeric}, passwordEnforceSpecial: ${_this.passwordEnforceSpecial}, loaded: ${_this.loaded})';
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +72,7 @@ class _$NextcloudCapabilitiesStateCopyWithImpl<$Res>
|
||||
/// Create a copy of NextcloudCapabilitiesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? apiEnabled = null,Object? publicEnabled = null,Object? publicMultipleLinks = null,Object? publicUploadEnabled = null,Object? publicPasswordEnforced = null,Object? publicExpireEnabled = null,Object? publicExpireDays = freezed,Object? publicExpireEnforced = null,Object? groupEnabled = null,Object? resharing = null,Object? passwordMinLength = freezed,Object? passwordEnforceUpperLower = null,Object? passwordEnforceNumeric = null,Object? passwordEnforceSpecial = null,Object? loaded = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(NextcloudCapabilitiesState(
|
||||
apiEnabled: null == apiEnabled ? _self.apiEnabled : apiEnabled // ignore: cast_nullable_to_non_nullable
|
||||
as bool,publicEnabled: null == publicEnabled ? _self.publicEnabled : publicEnabled // ignore: cast_nullable_to_non_nullable
|
||||
as bool,publicMultipleLinks: null == publicMultipleLinks ? _self.publicMultipleLinks : publicMultipleLinks // ignore: cast_nullable_to_non_nullable
|
||||
@@ -242,8 +246,6 @@ class _NextcloudCapabilitiesState implements NextcloudCapabilitiesState {
|
||||
@override@JsonKey() final bool passwordEnforceUpperLower;
|
||||
@override@JsonKey() final bool passwordEnforceNumeric;
|
||||
@override@JsonKey() final bool passwordEnforceSpecial;
|
||||
// Whether a capability response (or a definitive failure) has been observed
|
||||
// at least once this session.
|
||||
@override@JsonKey() final bool loaded;
|
||||
|
||||
/// Create a copy of NextcloudCapabilitiesState
|
||||
@@ -259,16 +261,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _NextcloudCapabilitiesState&&(identical(other.apiEnabled, apiEnabled) || other.apiEnabled == apiEnabled)&&(identical(other.publicEnabled, publicEnabled) || other.publicEnabled == publicEnabled)&&(identical(other.publicMultipleLinks, publicMultipleLinks) || other.publicMultipleLinks == publicMultipleLinks)&&(identical(other.publicUploadEnabled, publicUploadEnabled) || other.publicUploadEnabled == publicUploadEnabled)&&(identical(other.publicPasswordEnforced, publicPasswordEnforced) || other.publicPasswordEnforced == publicPasswordEnforced)&&(identical(other.publicExpireEnabled, publicExpireEnabled) || other.publicExpireEnabled == publicExpireEnabled)&&(identical(other.publicExpireDays, publicExpireDays) || other.publicExpireDays == publicExpireDays)&&(identical(other.publicExpireEnforced, publicExpireEnforced) || other.publicExpireEnforced == publicExpireEnforced)&&(identical(other.groupEnabled, groupEnabled) || other.groupEnabled == groupEnabled)&&(identical(other.resharing, resharing) || other.resharing == resharing)&&(identical(other.passwordMinLength, passwordMinLength) || other.passwordMinLength == passwordMinLength)&&(identical(other.passwordEnforceUpperLower, passwordEnforceUpperLower) || other.passwordEnforceUpperLower == passwordEnforceUpperLower)&&(identical(other.passwordEnforceNumeric, passwordEnforceNumeric) || other.passwordEnforceNumeric == passwordEnforceNumeric)&&(identical(other.passwordEnforceSpecial, passwordEnforceSpecial) || other.passwordEnforceSpecial == passwordEnforceSpecial)&&(identical(other.loaded, loaded) || other.loaded == loaded));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _NextcloudCapabilitiesState&&(identical(other.apiEnabled, apiEnabled) || other.apiEnabled == apiEnabled)&&(identical(other.publicEnabled, publicEnabled) || other.publicEnabled == publicEnabled)&&(identical(other.publicMultipleLinks, publicMultipleLinks) || other.publicMultipleLinks == publicMultipleLinks)&&(identical(other.publicUploadEnabled, publicUploadEnabled) || other.publicUploadEnabled == publicUploadEnabled)&&(identical(other.publicPasswordEnforced, publicPasswordEnforced) || other.publicPasswordEnforced == publicPasswordEnforced)&&(identical(other.publicExpireEnabled, publicExpireEnabled) || other.publicExpireEnabled == publicExpireEnabled)&&(identical(other.publicExpireDays, publicExpireDays) || other.publicExpireDays == publicExpireDays)&&(identical(other.publicExpireEnforced, publicExpireEnforced) || other.publicExpireEnforced == publicExpireEnforced)&&(identical(other.groupEnabled, groupEnabled) || other.groupEnabled == groupEnabled)&&(identical(other.resharing, resharing) || other.resharing == resharing)&&(identical(other.passwordMinLength, passwordMinLength) || other.passwordMinLength == passwordMinLength)&&(identical(other.passwordEnforceUpperLower, passwordEnforceUpperLower) || other.passwordEnforceUpperLower == passwordEnforceUpperLower)&&(identical(other.passwordEnforceNumeric, passwordEnforceNumeric) || other.passwordEnforceNumeric == passwordEnforceNumeric)&&(identical(other.passwordEnforceSpecial, passwordEnforceSpecial) || other.passwordEnforceSpecial == passwordEnforceSpecial)&&(identical(other.loaded, loaded) || other.loaded == loaded));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,apiEnabled,publicEnabled,publicMultipleLinks,publicUploadEnabled,publicPasswordEnforced,publicExpireEnabled,publicExpireDays,publicExpireEnforced,groupEnabled,resharing,passwordMinLength,passwordEnforceUpperLower,passwordEnforceNumeric,passwordEnforceSpecial,loaded);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,apiEnabled,publicEnabled,publicMultipleLinks,publicUploadEnabled,publicPasswordEnforced,publicExpireEnabled,publicExpireDays,publicExpireEnforced,groupEnabled,resharing,passwordMinLength,passwordEnforceUpperLower,passwordEnforceNumeric,passwordEnforceSpecial,loaded);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NextcloudCapabilitiesState(apiEnabled: $apiEnabled, publicEnabled: $publicEnabled, publicMultipleLinks: $publicMultipleLinks, publicUploadEnabled: $publicUploadEnabled, publicPasswordEnforced: $publicPasswordEnforced, publicExpireEnabled: $publicExpireEnabled, publicExpireDays: $publicExpireDays, publicExpireEnforced: $publicExpireEnforced, groupEnabled: $groupEnabled, resharing: $resharing, passwordMinLength: $passwordMinLength, passwordEnforceUpperLower: $passwordEnforceUpperLower, passwordEnforceNumeric: $passwordEnforceNumeric, passwordEnforceSpecial: $passwordEnforceSpecial, loaded: $loaded)';
|
||||
return 'NextcloudCapabilitiesState(apiEnabled: $apiEnabled, publicEnabled: $publicEnabled, publicMultipleLinks: $publicMultipleLinks, publicUploadEnabled: $publicUploadEnabled, publicPasswordEnforced: $publicPasswordEnforced, publicExpireEnabled: $publicExpireEnabled, publicExpireDays: $publicExpireDays, publicExpireEnforced: $publicExpireEnforced, groupEnabled: $groupEnabled, resharing: $resharing, passwordMinLength: $passwordMinLength, passwordEnforceUpperLower: $passwordEnforceUpperLower, passwordEnforceNumeric: $passwordEnforceNumeric, passwordEnforceSpecial: $passwordEnforceSpecial, loaded: $loaded)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'ticker_page_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'ticker_page_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $TickerPageStateCopyWith<TickerPageState> get copyWith => _$TickerPageStateCopyW
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TickerPageState&&(identical(other.page, page) || other.page == page));
|
||||
final _this = this as TickerPageState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TickerPageState&&(identical(other.page, _this.page) || other.page == _this.page));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,page);
|
||||
int get hashCode {
|
||||
final _this = this as TickerPageState;
|
||||
return Object.hash(runtimeType,_this.page);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TickerPageState(page: $page)';
|
||||
final _this = this as TickerPageState;
|
||||
return 'TickerPageState(page: ${_this.page})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$TickerPageStateCopyWithImpl<$Res>
|
||||
/// Create a copy of TickerPageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? page = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(TickerPageState(
|
||||
page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as TickerPageResponse?,
|
||||
));
|
||||
@@ -227,16 +233,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TickerPageState&&(identical(other.page, page) || other.page == page));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TickerPageState&&(identical(other.page, page) || other.page == page));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,page);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,page);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TickerPageState(page: $page)';
|
||||
return 'TickerPageState(page: $page)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'ticker_state.dart';
|
||||
@@ -9,6 +9,7 @@ part of 'ticker_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
@@ -28,16 +29,21 @@ $TickerStateCopyWith<TickerState> get copyWith => _$TickerStateCopyWithImpl<Tick
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TickerState&&(identical(other.ticker, ticker) || other.ticker == ticker)&&(identical(other.nav, nav) || other.nav == nav)&&(identical(other.selectedSlug, selectedSlug) || other.selectedSlug == selectedSlug));
|
||||
final _this = this as TickerState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TickerState&&(identical(other.ticker, _this.ticker) || other.ticker == _this.ticker)&&(identical(other.nav, _this.nav) || other.nav == _this.nav)&&(identical(other.selectedSlug, _this.selectedSlug) || other.selectedSlug == _this.selectedSlug));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,ticker,nav,selectedSlug);
|
||||
int get hashCode {
|
||||
final _this = this as TickerState;
|
||||
return Object.hash(runtimeType,_this.ticker,_this.nav,_this.selectedSlug);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TickerState(ticker: $ticker, nav: $nav, selectedSlug: $selectedSlug)';
|
||||
final _this = this as TickerState;
|
||||
return 'TickerState(ticker: ${_this.ticker}, nav: ${_this.nav}, selectedSlug: ${_this.selectedSlug})';
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +72,7 @@ class _$TickerStateCopyWithImpl<$Res>
|
||||
/// Create a copy of TickerState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? ticker = freezed,Object? nav = freezed,Object? selectedSlug = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(TickerState(
|
||||
ticker: freezed == ticker ? _self.ticker : ticker // ignore: cast_nullable_to_non_nullable
|
||||
as TickerResponse?,nav: freezed == nav ? _self.nav : nav // ignore: cast_nullable_to_non_nullable
|
||||
as TickerNavResponse?,selectedSlug: freezed == selectedSlug ? _self.selectedSlug : selectedSlug // ignore: cast_nullable_to_non_nullable
|
||||
@@ -231,16 +237,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TickerState&&(identical(other.ticker, ticker) || other.ticker == ticker)&&(identical(other.nav, nav) || other.nav == nav)&&(identical(other.selectedSlug, selectedSlug) || other.selectedSlug == selectedSlug));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TickerState&&(identical(other.ticker, ticker) || other.ticker == ticker)&&(identical(other.nav, nav) || other.nav == nav)&&(identical(other.selectedSlug, selectedSlug) || other.selectedSlug == selectedSlug));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,ticker,nav,selectedSlug);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,ticker,nav,selectedSlug);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TickerState(ticker: $ticker, nav: $nav, selectedSlug: $selectedSlug)';
|
||||
return 'TickerState(ticker: $ticker, nav: $nav, selectedSlug: $selectedSlug)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'timetable_state.dart';
|
||||
@@ -9,16 +9,14 @@ part of 'timetable_state.dart';
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TimetableState {
|
||||
|
||||
Map<String, TimetableGetWeekResponse> get weekCache; TimetableGetRoomsResponse? get rooms; TimetableGetSubjectsResponse? get subjects; TimetableGetHolidaysResponse? get schoolHolidays; TimetableGetSchoolyearResponse? get schoolyear; TimetableGetTimegridResponse? get timegrid; GetCustomTimetableEventResponse? get customEvents; DateTime get startDate; DateTime get endDate; int get dataVersion;// Boundaries learned from past server denials. A week is permitted when its
|
||||
// start is on/before `accessibleEndDate` and its end on/after
|
||||
// `accessibleStartDate`. Null = that bound not discovered yet.
|
||||
DateTime? get accessibleStartDate; DateTime? get accessibleEndDate;
|
||||
Map<String, TimetableGetWeekResponse> get weekCache; TimetableGetRoomsResponse? get rooms; TimetableGetSubjectsResponse? get subjects; TimetableGetHolidaysResponse? get schoolHolidays; TimetableGetSchoolyearResponse? get schoolyear; TimetableGetTimegridResponse? get timegrid; GetCustomTimetableEventResponse? get customEvents; DateTime get startDate; DateTime get endDate; int get dataVersion; DateTime? get accessibleStartDate; DateTime? get accessibleEndDate;
|
||||
/// Create a copy of TimetableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -31,16 +29,21 @@ $TimetableStateCopyWith<TimetableState> get copyWith => _$TimetableStateCopyWith
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TimetableState&&const DeepCollectionEquality().equals(other.weekCache, weekCache)&&(identical(other.rooms, rooms) || other.rooms == rooms)&&(identical(other.subjects, subjects) || other.subjects == subjects)&&(identical(other.schoolHolidays, schoolHolidays) || other.schoolHolidays == schoolHolidays)&&(identical(other.schoolyear, schoolyear) || other.schoolyear == schoolyear)&&(identical(other.timegrid, timegrid) || other.timegrid == timegrid)&&(identical(other.customEvents, customEvents) || other.customEvents == customEvents)&&(identical(other.startDate, startDate) || other.startDate == startDate)&&(identical(other.endDate, endDate) || other.endDate == endDate)&&(identical(other.dataVersion, dataVersion) || other.dataVersion == dataVersion)&&(identical(other.accessibleStartDate, accessibleStartDate) || other.accessibleStartDate == accessibleStartDate)&&(identical(other.accessibleEndDate, accessibleEndDate) || other.accessibleEndDate == accessibleEndDate));
|
||||
final _this = this as TimetableState;
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is TimetableState&&const DeepCollectionEquality().equals(other.weekCache, _this.weekCache)&&(identical(other.rooms, _this.rooms) || other.rooms == _this.rooms)&&(identical(other.subjects, _this.subjects) || other.subjects == _this.subjects)&&(identical(other.schoolHolidays, _this.schoolHolidays) || other.schoolHolidays == _this.schoolHolidays)&&(identical(other.schoolyear, _this.schoolyear) || other.schoolyear == _this.schoolyear)&&(identical(other.timegrid, _this.timegrid) || other.timegrid == _this.timegrid)&&(identical(other.customEvents, _this.customEvents) || other.customEvents == _this.customEvents)&&(identical(other.startDate, _this.startDate) || other.startDate == _this.startDate)&&(identical(other.endDate, _this.endDate) || other.endDate == _this.endDate)&&(identical(other.dataVersion, _this.dataVersion) || other.dataVersion == _this.dataVersion)&&(identical(other.accessibleStartDate, _this.accessibleStartDate) || other.accessibleStartDate == _this.accessibleStartDate)&&(identical(other.accessibleEndDate, _this.accessibleEndDate) || other.accessibleEndDate == _this.accessibleEndDate));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(weekCache),rooms,subjects,schoolHolidays,schoolyear,timegrid,customEvents,startDate,endDate,dataVersion,accessibleStartDate,accessibleEndDate);
|
||||
int get hashCode {
|
||||
final _this = this as TimetableState;
|
||||
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_this.weekCache),_this.rooms,_this.subjects,_this.schoolHolidays,_this.schoolyear,_this.timegrid,_this.customEvents,_this.startDate,_this.endDate,_this.dataVersion,_this.accessibleStartDate,_this.accessibleEndDate);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TimetableState(weekCache: $weekCache, rooms: $rooms, subjects: $subjects, schoolHolidays: $schoolHolidays, schoolyear: $schoolyear, timegrid: $timegrid, customEvents: $customEvents, startDate: $startDate, endDate: $endDate, dataVersion: $dataVersion, accessibleStartDate: $accessibleStartDate, accessibleEndDate: $accessibleEndDate)';
|
||||
final _this = this as TimetableState;
|
||||
return 'TimetableState(weekCache: ${_this.weekCache}, rooms: ${_this.rooms}, subjects: ${_this.subjects}, schoolHolidays: ${_this.schoolHolidays}, schoolyear: ${_this.schoolyear}, timegrid: ${_this.timegrid}, customEvents: ${_this.customEvents}, startDate: ${_this.startDate}, endDate: ${_this.endDate}, dataVersion: ${_this.dataVersion}, accessibleStartDate: ${_this.accessibleStartDate}, accessibleEndDate: ${_this.accessibleEndDate})';
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +72,7 @@ class _$TimetableStateCopyWithImpl<$Res>
|
||||
/// Create a copy of TimetableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? weekCache = null,Object? rooms = freezed,Object? subjects = freezed,Object? schoolHolidays = freezed,Object? schoolyear = freezed,Object? timegrid = freezed,Object? customEvents = freezed,Object? startDate = null,Object? endDate = null,Object? dataVersion = null,Object? accessibleStartDate = freezed,Object? accessibleEndDate = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
return _then(TimetableState(
|
||||
weekCache: null == weekCache ? _self.weekCache : weekCache // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, TimetableGetWeekResponse>,rooms: freezed == rooms ? _self.rooms : rooms // ignore: cast_nullable_to_non_nullable
|
||||
as TimetableGetRoomsResponse?,subjects: freezed == subjects ? _self.subjects : subjects // ignore: cast_nullable_to_non_nullable
|
||||
@@ -223,7 +226,7 @@ return $default(_that.weekCache,_that.rooms,_that.subjects,_that.schoolHolidays,
|
||||
@JsonSerializable()
|
||||
|
||||
class _TimetableState extends TimetableState {
|
||||
const _TimetableState({final Map<String, TimetableGetWeekResponse> weekCache = const <String, TimetableGetWeekResponse>{}, this.rooms, this.subjects, this.schoolHolidays, this.schoolyear, this.timegrid, this.customEvents, required this.startDate, required this.endDate, this.dataVersion = 0, this.accessibleStartDate, this.accessibleEndDate}): _weekCache = weekCache,super._();
|
||||
const _TimetableState({ Map<String, TimetableGetWeekResponse> weekCache = const <String, TimetableGetWeekResponse>{}, this.rooms, this.subjects, this.schoolHolidays, this.schoolyear, this.timegrid, this.customEvents, required this.startDate, required this.endDate, this.dataVersion = 0, this.accessibleStartDate, this.accessibleEndDate}): _weekCache = weekCache,super._();
|
||||
factory _TimetableState.fromJson(Map<String, dynamic> json) => _$TimetableStateFromJson(json);
|
||||
|
||||
final Map<String, TimetableGetWeekResponse> _weekCache;
|
||||
@@ -242,9 +245,6 @@ class _TimetableState extends TimetableState {
|
||||
@override final DateTime startDate;
|
||||
@override final DateTime endDate;
|
||||
@override@JsonKey() final int dataVersion;
|
||||
// Boundaries learned from past server denials. A week is permitted when its
|
||||
// start is on/before `accessibleEndDate` and its end on/after
|
||||
// `accessibleStartDate`. Null = that bound not discovered yet.
|
||||
@override final DateTime? accessibleStartDate;
|
||||
@override final DateTime? accessibleEndDate;
|
||||
|
||||
@@ -261,16 +261,18 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TimetableState&&const DeepCollectionEquality().equals(other._weekCache, _weekCache)&&(identical(other.rooms, rooms) || other.rooms == rooms)&&(identical(other.subjects, subjects) || other.subjects == subjects)&&(identical(other.schoolHolidays, schoolHolidays) || other.schoolHolidays == schoolHolidays)&&(identical(other.schoolyear, schoolyear) || other.schoolyear == schoolyear)&&(identical(other.timegrid, timegrid) || other.timegrid == timegrid)&&(identical(other.customEvents, customEvents) || other.customEvents == customEvents)&&(identical(other.startDate, startDate) || other.startDate == startDate)&&(identical(other.endDate, endDate) || other.endDate == endDate)&&(identical(other.dataVersion, dataVersion) || other.dataVersion == dataVersion)&&(identical(other.accessibleStartDate, accessibleStartDate) || other.accessibleStartDate == accessibleStartDate)&&(identical(other.accessibleEndDate, accessibleEndDate) || other.accessibleEndDate == accessibleEndDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TimetableState&&const DeepCollectionEquality().equals(other.weekCache, _weekCache)&&(identical(other.rooms, rooms) || other.rooms == rooms)&&(identical(other.subjects, subjects) || other.subjects == subjects)&&(identical(other.schoolHolidays, schoolHolidays) || other.schoolHolidays == schoolHolidays)&&(identical(other.schoolyear, schoolyear) || other.schoolyear == schoolyear)&&(identical(other.timegrid, timegrid) || other.timegrid == timegrid)&&(identical(other.customEvents, customEvents) || other.customEvents == customEvents)&&(identical(other.startDate, startDate) || other.startDate == startDate)&&(identical(other.endDate, endDate) || other.endDate == endDate)&&(identical(other.dataVersion, dataVersion) || other.dataVersion == dataVersion)&&(identical(other.accessibleStartDate, accessibleStartDate) || other.accessibleStartDate == accessibleStartDate)&&(identical(other.accessibleEndDate, accessibleEndDate) || other.accessibleEndDate == accessibleEndDate));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_weekCache),rooms,subjects,schoolHolidays,schoolyear,timegrid,customEvents,startDate,endDate,dataVersion,accessibleStartDate,accessibleEndDate);
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_weekCache),rooms,subjects,schoolHolidays,schoolyear,timegrid,customEvents,startDate,endDate,dataVersion,accessibleStartDate,accessibleEndDate);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TimetableState(weekCache: $weekCache, rooms: $rooms, subjects: $subjects, schoolHolidays: $schoolHolidays, schoolyear: $schoolyear, timegrid: $timegrid, customEvents: $customEvents, startDate: $startDate, endDate: $endDate, dataVersion: $dataVersion, accessibleStartDate: $accessibleStartDate, accessibleEndDate: $accessibleEndDate)';
|
||||
return 'TimetableState(weekCache: $weekCache, rooms: $rooms, subjects: $subjects, schoolHolidays: $schoolHolidays, schoolyear: $schoolyear, timegrid: $timegrid, customEvents: $customEvents, startDate: $startDate, endDate: $endDate, dataVersion: $dataVersion, accessibleStartDate: $accessibleStartDate, accessibleEndDate: $accessibleEndDate)';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:background_downloader/background_downloader.dart' as bd;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
import '../../api/marianumcloud/webdav/webdav_api.dart';
|
||||
import '../../notification/notification_service.dart';
|
||||
@@ -34,6 +35,10 @@ class DownloadManager {
|
||||
/// "Teilen"/"Speichern" actions.
|
||||
static const _directory = 'downloads';
|
||||
|
||||
/// Where finished downloads land (`BaseDirectory.temporary` + [_directory]).
|
||||
static Future<Directory> downloadsDirectory() async =>
|
||||
Directory('${(await getTemporaryDirectory()).path}/$_directory');
|
||||
|
||||
final Map<String, DownloadJob> _jobs = {}; // keyed by remotePath
|
||||
final Map<String, DownloadJob> _byTaskId = {};
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
|
||||
import '../../../api/marianumcloud/webdav/queries/list_files/cacheable_file.dart';
|
||||
import '../../../api/marianumcloud/webdav/queries/list_files/list_files_response.dart';
|
||||
import '../../../routing/app_routes.dart';
|
||||
import '../../../state/app/infrastructure/loadable_state/loadable_state.dart';
|
||||
import '../../../state/app/infrastructure/loadable_state/view/loadable_state_consumer.dart';
|
||||
import '../../../state/app/infrastructure/utility_widgets/bloc_module.dart';
|
||||
@@ -15,7 +15,6 @@ import '../../../utils/cache_invalidation_bus.dart';
|
||||
import '../../../widget/placeholder_view.dart';
|
||||
import 'data/file_sort.dart';
|
||||
import 'data/webdav_path.dart';
|
||||
import 'files_upload_dialog.dart';
|
||||
import 'search/files_search_delegate.dart';
|
||||
import 'widgets/add_file_menu.dart';
|
||||
import 'widgets/clipboard_banner.dart';
|
||||
@@ -82,14 +81,11 @@ class _FilesViewState extends State<_FilesView> {
|
||||
if (paths == null) return;
|
||||
final bloc = context.read<FilesBloc>();
|
||||
unawaited(
|
||||
pushScreen(
|
||||
AppRoutes.openFilesUpload(
|
||||
context,
|
||||
withNavBar: false,
|
||||
screen: FilesUploadDialog(
|
||||
filePaths: paths,
|
||||
remotePath: widget.path.join('/'),
|
||||
onUploadFinished: (_) => bloc.refresh(),
|
||||
),
|
||||
filePaths: paths,
|
||||
remotePath: widget.path.join('/'),
|
||||
onUploadFinished: (_) => bloc.refresh(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class FileLeading extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl:
|
||||
'https://${EndpointData().nextcloud().full()}'
|
||||
'${EndpointData().nextcloud().origin()}'
|
||||
'/index.php/core/preview'
|
||||
'?fileId=$fileId&x=128&y=128&a=0',
|
||||
httpHeaders: SessionManager().requireNextcloud().authHeaders,
|
||||
|
||||
@@ -94,7 +94,7 @@ class _DiagnosticsPageState extends State<DiagnosticsPage> {
|
||||
rows: await rows({
|
||||
'Marianum Connect': () async => MarianumConnectEndpoint.current(),
|
||||
'Nextcloud': () async =>
|
||||
'https://${EndpointData().nextcloud().full()}',
|
||||
EndpointData().nextcloud().origin(),
|
||||
'Notfall-Nachricht': () async =>
|
||||
settings.devToolsSettings.resolveEmergencyNoticeUrl(),
|
||||
}),
|
||||
|
||||
@@ -121,8 +121,7 @@ class DevToolsSection extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () =>
|
||||
MarianumConnectEndpointPicker.show(context, settings),
|
||||
onTap: () => MarianumConnectEndpointPicker.show(context, settings),
|
||||
),
|
||||
BlocBuilder<SettingsCubit, model.Settings>(
|
||||
bloc: settings,
|
||||
@@ -137,8 +136,7 @@ class DevToolsSection extends StatelessWidget {
|
||||
title: const Text('Notfall-Nachrichtenquelle'),
|
||||
subtitle: Text(override.isEmpty ? 'Standardquelle' : override),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () =>
|
||||
_EmergencyNoticeUrlEditor.show(context, settings),
|
||||
onTap: () => _EmergencyNoticeUrlEditor.show(context, settings),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -146,9 +144,8 @@ class DevToolsSection extends StatelessWidget {
|
||||
_StorageTile(
|
||||
icon: Icons.settings_applications_outlined,
|
||||
title: 'Einstellungen',
|
||||
describe: () async => filesize(
|
||||
utf8.encode(jsonEncode(settings.val().toJson())).length,
|
||||
),
|
||||
describe: () async =>
|
||||
filesize(utf8.encode(jsonEncode(settings.val().toJson())).length),
|
||||
onOpen: (_) async => AppRoutes.openJsonViewer(
|
||||
context,
|
||||
settings.val().toJson(),
|
||||
@@ -235,15 +232,16 @@ class DevToolsSection extends StatelessWidget {
|
||||
_StorageTile(
|
||||
icon: Icons.download_outlined,
|
||||
title: 'Downloads',
|
||||
describe: () async =>
|
||||
filesize(await directorySize(await _downloadsDir())),
|
||||
describe: () async => filesize(
|
||||
await directorySize(await DownloadManager.downloadsDirectory()),
|
||||
),
|
||||
clearTitle: 'Downloads löschen',
|
||||
clearContent:
|
||||
'Laufende Downloads werden abgebrochen und heruntergeladene '
|
||||
'Dateien gelöscht.',
|
||||
onClear: () async {
|
||||
DownloadManager.instance.clearAll();
|
||||
final dir = await _downloadsDir();
|
||||
final dir = await DownloadManager.downloadsDirectory();
|
||||
if (!dir.existsSync()) return;
|
||||
// Cancelled tasks can still be flushing into the folder, so deleting
|
||||
// it as a whole races them; whatever survives shows up in the size.
|
||||
@@ -258,9 +256,6 @@ class DevToolsSection extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
static Future<Directory> _downloadsDir() async =>
|
||||
Directory('${(await getTemporaryDirectory()).path}/downloads');
|
||||
}
|
||||
|
||||
/// Storage row: tap opens a detail view ([onOpen]), the trailing button clears
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
|
||||
import '../../../api/errors/error_mapper.dart';
|
||||
import '../../../api/marianumcloud/talk/room/get_room_response.dart';
|
||||
@@ -20,7 +19,6 @@ import '../../../state/app/modules/settings/bloc/settings_cubit.dart';
|
||||
import '../../../widget/app_progress_indicator.dart';
|
||||
import '../../../widget/info_dialog.dart';
|
||||
import '../../../widget/placeholder_view.dart';
|
||||
import '../files/files_upload_dialog.dart';
|
||||
import '../talk/search_chat.dart';
|
||||
import '../talk/widgets/chat_tile.dart';
|
||||
|
||||
@@ -144,16 +142,13 @@ Future<void> _externalShareFlow(
|
||||
try {
|
||||
await ensureTalkShareFolder();
|
||||
if (!context.mounted) return;
|
||||
await pushScreen(
|
||||
await AppRoutes.openFilesUpload(
|
||||
context,
|
||||
withNavBar: false,
|
||||
screen: FilesUploadDialog(
|
||||
filePaths: share.filePaths,
|
||||
remotePath: talkShareFolder,
|
||||
uniqueNames: true,
|
||||
onUploadFinished: (uploaded) =>
|
||||
_afterExternalFilesUploaded(context, room, uploaded, share),
|
||||
),
|
||||
filePaths: share.filePaths,
|
||||
remotePath: talkShareFolder,
|
||||
uniqueNames: true,
|
||||
onUploadFinished: (uploaded) =>
|
||||
_afterExternalFilesUploaded(context, room, uploaded, share),
|
||||
);
|
||||
} finally {
|
||||
ShareIntentListener.instance.endFlow();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
|
||||
import '../../../api/errors/error_mapper.dart';
|
||||
import '../../../routing/app_routes.dart';
|
||||
@@ -17,7 +16,6 @@ import '../../../widget/centered_leading.dart';
|
||||
import '../../../widget/info_dialog.dart';
|
||||
import '../../../widget/placeholder_view.dart';
|
||||
import '../files/data/file_sort.dart';
|
||||
import '../files/files_upload_dialog.dart';
|
||||
import '../files/widgets/add_file_menu.dart';
|
||||
import '../files/widgets/file_leading.dart';
|
||||
import '../files/widgets/files_sort_actions.dart';
|
||||
@@ -173,15 +171,12 @@ Future<void> _externalUploadFlow(
|
||||
) async {
|
||||
ShareIntentListener.instance.beginFlow();
|
||||
try {
|
||||
await pushScreen(
|
||||
await AppRoutes.openFilesUpload(
|
||||
context,
|
||||
withNavBar: false,
|
||||
screen: FilesUploadDialog(
|
||||
filePaths: share.filePaths,
|
||||
remotePath: targetPath.join('/'),
|
||||
onUploadFinished: (_) =>
|
||||
_afterExternalUploaded(context, targetPath, share),
|
||||
),
|
||||
filePaths: share.filePaths,
|
||||
remotePath: targetPath.join('/'),
|
||||
onUploadFinished: (_) =>
|
||||
_afterExternalUploaded(context, targetPath, share),
|
||||
);
|
||||
} finally {
|
||||
ShareIntentListener.instance.endFlow();
|
||||
|
||||
@@ -304,9 +304,7 @@ class _ChatViewState extends State<ChatView> with RouteAware {
|
||||
for (final element in response.sortByTimestamp()) {
|
||||
if (ChatSearchController.isHiddenSystemMessage(element)) continue;
|
||||
|
||||
final elementDate = DateTime.fromMillisecondsSinceEpoch(
|
||||
element.timestamp * 1000,
|
||||
);
|
||||
final elementDate = element.sentAt;
|
||||
|
||||
if (!elementDate.isSameDay(lastDate)) {
|
||||
lastDate = elementDate;
|
||||
|
||||
@@ -106,7 +106,7 @@ class ChatMessage {
|
||||
errorListener: (value) {},
|
||||
httpHeaders: SessionManager().requireNextcloud().authHeaders,
|
||||
imageUrl:
|
||||
'https://${EndpointData().nextcloud().full()}/index.php/core/preview?fileId=${file.id}&x=130&y=-1&a=1',
|
||||
'${EndpointData().nextcloud().origin()}/index.php/core/preview?fileId=${file.id}&x=130&y=-1&a=1',
|
||||
),
|
||||
if (originalMessage != '{file}') ...[
|
||||
SizedBox(height: 5),
|
||||
|
||||
@@ -511,7 +511,7 @@ class _SharedItemTileState extends State<_SharedItemTile>
|
||||
}
|
||||
|
||||
String get _previewUrl =>
|
||||
'https://${EndpointData().nextcloud().full()}'
|
||||
'${EndpointData().nextcloud().origin()}'
|
||||
'/index.php/core/preview?fileId=${_file.id}&x=300&y=300&a=1';
|
||||
|
||||
bool get _isVideo => _isVideoFile(_file.name);
|
||||
@@ -586,7 +586,7 @@ class _SharedItemTileState extends State<_SharedItemTile>
|
||||
title: Text(_file.name, maxLines: 2, overflow: TextOverflow.ellipsis),
|
||||
subtitle: Text(
|
||||
'${widget.item.actorDisplayName} · '
|
||||
'${DateTime.fromMillisecondsSinceEpoch(widget.item.timestamp * 1000).formatDateShort()}',
|
||||
'${widget.item.sentAt.formatDateShort()}',
|
||||
),
|
||||
trailing: _isDownloading
|
||||
? SizedBox(
|
||||
|
||||
@@ -257,9 +257,7 @@ class _ChatBubbleState extends State<ChatBubble>
|
||||
: actorText;
|
||||
|
||||
final timeText = Text(
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
widget.bubbleData.timestamp * 1000,
|
||||
).formatHm(),
|
||||
widget.bubbleData.sentAt.formatHm(),
|
||||
textAlign: TextAlign.end,
|
||||
style: const TextStyle(color: _kTimeIconColor, fontSize: _kTimeIconSize),
|
||||
);
|
||||
|
||||
@@ -67,9 +67,7 @@ void showChatMessageOptionsDialog(
|
||||
final hasReactions = bubbleData.reactions?.isNotEmpty ?? false;
|
||||
final canDelete =
|
||||
isSender &&
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
bubbleData.timestamp * 1000,
|
||||
).add(const Duration(hours: 6)).isAfter(DateTime.now());
|
||||
bubbleData.sentAt.add(const Duration(hours: 6)).isAfter(DateTime.now());
|
||||
final attachedFile = _attachedFile(bubbleData);
|
||||
|
||||
showDetailsBottomSheet(
|
||||
|
||||
@@ -2,12 +2,12 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
|
||||
import '../../../../api/marianumcloud/talk/room/get_room_response.dart';
|
||||
import '../../../../api/marianumcloud/talk/send_message/send_message.dart';
|
||||
import '../../../../api/marianumcloud/talk/send_message/send_message_params.dart';
|
||||
import '../../../../api/marianumcloud/talk/share_files_to_chat.dart';
|
||||
import '../../../../routing/app_routes.dart';
|
||||
import '../../../../state/app/modules/chat/bloc/chat_bloc.dart';
|
||||
import '../../../../state/app/modules/chat/bloc/chat_state.dart';
|
||||
import '../../../../state/app/modules/settings/bloc/settings_cubit.dart';
|
||||
@@ -18,7 +18,6 @@ import '../../../../widget/downloads/download_tray.dart';
|
||||
import '../../../../widget/emoji_picker_dialog.dart';
|
||||
import '../../../../widget/file_pick.dart';
|
||||
import '../../../../widget/focus_behaviour.dart';
|
||||
import '../../files/files_upload_dialog.dart';
|
||||
import 'answer_reference.dart';
|
||||
import 'poll_create_sheet.dart';
|
||||
|
||||
@@ -71,15 +70,12 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
||||
|
||||
if (!mounted) return;
|
||||
unawaited(
|
||||
pushScreen(
|
||||
AppRoutes.openFilesUpload(
|
||||
context,
|
||||
withNavBar: false,
|
||||
screen: FilesUploadDialog(
|
||||
filePaths: paths,
|
||||
remotePath: talkShareFolder,
|
||||
onUploadFinished: share,
|
||||
uniqueNames: true,
|
||||
),
|
||||
filePaths: paths,
|
||||
remotePath: talkShareFolder,
|
||||
onUploadFinished: share,
|
||||
uniqueNames: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ class _ChatTileState extends State<ChatTile> {
|
||||
],
|
||||
),
|
||||
subtitle: Text(
|
||||
'${DateTime.fromMillisecondsSinceEpoch(widget.data.lastMessage.timestamp * 1000).formatRelative()}: '
|
||||
'${widget.data.lastMessage.sentAt.formatRelative()}: '
|
||||
'${_lastMessagePreview()}',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -13,12 +13,12 @@ import '../app_progress_indicator.dart';
|
||||
/// trigger its `errorWidget`. Prefers `fileId` because the path variant
|
||||
/// is unreliable on some server configurations.
|
||||
String _ncPreviewUrl(RemoteFileRef remote, {int width = 1024}) {
|
||||
final host = EndpointData().nextcloud().full();
|
||||
final origin = EndpointData().nextcloud().origin();
|
||||
final id = remote.fileId;
|
||||
final selector = id != null
|
||||
? 'fileId=$id'
|
||||
: 'file=${Uri.encodeQueryComponent(remote.path)}';
|
||||
return 'https://$host/index.php/core/preview?$selector&x=$width&y=-1&a=1';
|
||||
return '$origin/index.php/core/preview?$selector&x=$width&y=-1&a=1';
|
||||
}
|
||||
|
||||
/// Header block for the "Vorschau nicht verfügbar" screen.
|
||||
|
||||
@@ -78,14 +78,14 @@ final ValueNotifier<int> _avatarCacheGeneration = ValueNotifier<int>(0);
|
||||
|
||||
String avatarUrl({required String id, required bool isGroup, int size = 512}) {
|
||||
if (isGroup) {
|
||||
final host = EndpointData().nextcloud().full();
|
||||
return 'https://$host/ocs/v2.php/apps/spreed/api/v1/room/$id/avatar';
|
||||
final origin = EndpointData().nextcloud().origin();
|
||||
return '$origin/ocs/v2.php/apps/spreed/api/v1/room/$id/avatar';
|
||||
}
|
||||
return '${_userAvatarUrlPrefix(id)}$size';
|
||||
}
|
||||
|
||||
String _userAvatarUrlPrefix(String id) =>
|
||||
'https://${EndpointData().nextcloud().full()}/avatar/$id/';
|
||||
'${EndpointData().nextcloud().origin()}/avatar/$id/';
|
||||
|
||||
/// Resolves an avatar through the shared caches: in-memory first, then disk,
|
||||
/// then the network — the fetch being deduped across every concurrent caller
|
||||
|
||||
Reference in New Issue
Block a user