File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,13 +133,7 @@ class ApiClient {
133133class SSLHttpOverrides extends HttpOverrides {
134134 @override
135135 HttpClient createHttpClient (SecurityContext ? context) {
136- return super .createHttpClient (context)..badCertificateCallback = ApiClient .piwigoSSLBypass;
137- }
138- }
139-
140- class SSLHttpOverrides extends HttpOverrides {
141- @override
142- HttpClient createHttpClient (SecurityContext ? context) {
143- return super .createHttpClient (context)..badCertificateCallback = ApiClient .piwigoSSLBypass;
136+ return super .createHttpClient (context)
137+ ..badCertificateCallback = ApiClient .piwigoSSLBypass;
144138 }
145139}
Original file line number Diff line number Diff line change @@ -36,23 +36,6 @@ class ImageModel {
3636 this .tags = const [],
3737 });
3838
39- ImageModel ({
40- required this .id,
41- this .width = 1 ,
42- this .height = 1 ,
43- this .hit = 0 ,
44- this .favorite = false ,
45- this .file = '' ,
46- required this .name,
47- this .comment,
48- this .dateCreation,
49- this .dateAvailable,
50- this .pageUrl,
51- required this .elementUrl,
52- required this .derivatives,
53- this .categories = const [],
54- });
55-
5639 ImageModel .fromJson (Map <String , dynamic > json)
5740 : id = json['id' ],
5841 width = int .tryParse (json['width' ].toString ()) ?? 0 ,
@@ -106,33 +89,6 @@ class ImageModel {
10689 return mimeType != null && mimeType.startsWith ('video' );
10790 }
10891
109- Derivative ? getDerivativeFromString (String derivative) {
110- switch (derivative) {
111- case 'square' :
112- return derivatives.square;
113- case 'thumb' :
114- return derivatives.thumbnail;
115- case '2small' :
116- return derivatives.xxsmall;
117- case 'xsmall' :
118- return derivatives.xsmall;
119- case 'small' :
120- return derivatives.small;
121- case 'medium' :
122- return derivatives.medium;
123- case 'large' :
124- return derivatives.large;
125- case 'xlarge' :
126- return derivatives.xlarge;
127- case 'xxlarge' :
128- return derivatives.xxlarge;
129- case 'full' :
130- return derivatives.full;
131- default :
132- return null ;
133- }
134- }
135-
13692 @override
13793 operator == (other) => other is ImageModel && id == other.id;
13894
Original file line number Diff line number Diff line change @@ -86,15 +86,6 @@ class Preferences {
8686 return Settings .sortFromValue (sortValue);
8787 }
8888
89- static const String imageSortKey = 'IMAGE_SORT' ;
90- static SortMethods get getImageSort {
91- String ? sortValue = appPreferences.getString (imageSortKey);
92- if (sortValue == null ) {
93- return Settings .defaultImageSort;
94- }
95- return Settings .sortFromValue (sortValue);
96- }
97-
9889 static const String albumThumbnailSizeKey = 'ALBUM_THUMBNAIL_SIZE' ;
9990
10091 static String get getAlbumThumbnailSize {
@@ -155,16 +146,6 @@ class Preferences {
155146 return appPreferences.getBool (uploadNotificationKey) ?? true ;
156147 }
157148
158- static const String downloadNotification = 'DOWNLOAD_NOTIFICATION' ;
159- static bool get getDownloadNotification {
160- return appPreferences.getBool (downloadNotification) ?? true ;
161- }
162-
163- static const String uploadNotification = 'UPLOAD_NOTIFICATION' ;
164- static bool get getUploadNotification {
165- return appPreferences.getBool (uploadNotification) ?? true ;
166- }
167-
168149 // ------------ Set preferences ------------
169150
170151 /// Save account login (username and password)
You can’t perform that action at this time.
0 commit comments