@@ -29,9 +29,8 @@ public final class TDLibSettings {
2929 private String deviceModel ;
3030 private String systemVersion ;
3131 private String applicationVersion ;
32- private boolean enableStorageOptimizer ;
33- private boolean ignoreFileNames ;
3432
33+ @ Deprecated
3534 private TDLibSettings (boolean useTestDatacenter ,
3635 Path databaseDirectoryPath ,
3736 Path downloadedFilesDirectoryPath ,
@@ -45,6 +44,31 @@ private TDLibSettings(boolean useTestDatacenter,
4544 String applicationVersion ,
4645 boolean enableStorageOptimizer ,
4746 boolean ignoreFileNames ) {
47+ this (useTestDatacenter ,
48+ databaseDirectoryPath ,
49+ downloadedFilesDirectoryPath ,
50+ fileDatabaseEnabled ,
51+ chatInfoDatabaseEnabled ,
52+ messageDatabaseEnabled ,
53+ apiToken ,
54+ systemLanguageCode ,
55+ deviceModel ,
56+ systemVersion ,
57+ applicationVersion
58+ );
59+ }
60+
61+ private TDLibSettings (boolean useTestDatacenter ,
62+ Path databaseDirectoryPath ,
63+ Path downloadedFilesDirectoryPath ,
64+ boolean fileDatabaseEnabled ,
65+ boolean chatInfoDatabaseEnabled ,
66+ boolean messageDatabaseEnabled ,
67+ APIToken apiToken ,
68+ String systemLanguageCode ,
69+ String deviceModel ,
70+ String systemVersion ,
71+ String applicationVersion ) {
4872 this .useTestDatacenter = useTestDatacenter ;
4973 this .databaseDirectoryPath = databaseDirectoryPath ;
5074 this .downloadedFilesDirectoryPath = downloadedFilesDirectoryPath ;
@@ -56,8 +80,6 @@ private TDLibSettings(boolean useTestDatacenter,
5680 this .deviceModel = deviceModel ;
5781 this .systemVersion = systemVersion ;
5882 this .applicationVersion = applicationVersion ;
59- this .enableStorageOptimizer = enableStorageOptimizer ;
60- this .ignoreFileNames = ignoreFileNames ;
6183 }
6284
6385 public static TDLibSettings create (APIToken apiToken ) {
@@ -165,20 +187,22 @@ public void setApplicationVersion(String applicationVersion) {
165187 this .applicationVersion = applicationVersion ;
166188 }
167189
190+ @ Deprecated
168191 public boolean isStorageOptimizerEnabled () {
169- return enableStorageOptimizer ;
192+ return false ;
170193 }
171194
195+ @ Deprecated
172196 public void setEnableStorageOptimizer (boolean enableStorageOptimizer ) {
173- this .enableStorageOptimizer = enableStorageOptimizer ;
174197 }
175198
199+ @ Deprecated
176200 public boolean isIgnoreFileNames () {
177- return ignoreFileNames ;
201+ return false ;
178202 }
179203
204+ @ Deprecated
180205 public void setIgnoreFileNames (boolean ignoreFileNames ) {
181- this .ignoreFileNames = ignoreFileNames ;
182206 }
183207
184208 @ Override
@@ -193,7 +217,6 @@ public boolean equals(Object o) {
193217 return useTestDatacenter == that .useTestDatacenter && fileDatabaseEnabled == that .fileDatabaseEnabled
194218 && chatInfoDatabaseEnabled == that .chatInfoDatabaseEnabled
195219 && messageDatabaseEnabled == that .messageDatabaseEnabled
196- && enableStorageOptimizer == that .enableStorageOptimizer && ignoreFileNames == that .ignoreFileNames
197220 && Objects .equals (databaseDirectoryPath , that .databaseDirectoryPath ) && Objects .equals (
198221 downloadedFilesDirectoryPath ,
199222 that .downloadedFilesDirectoryPath
@@ -214,9 +237,7 @@ public int hashCode() {
214237 systemLanguageCode ,
215238 deviceModel ,
216239 systemVersion ,
217- applicationVersion ,
218- enableStorageOptimizer ,
219- ignoreFileNames
240+ applicationVersion
220241 );
221242 }
222243
@@ -234,8 +255,6 @@ public String toString() {
234255 .add ("deviceModel='" + deviceModel + "'" )
235256 .add ("systemVersion='" + systemVersion + "'" )
236257 .add ("applicationVersion='" + applicationVersion + "'" )
237- .add ("enableStorageOptimizer=" + enableStorageOptimizer )
238- .add ("ignoreFileNames=" + ignoreFileNames )
239258 .toString ();
240259 }
241260}
0 commit comments