Refactoring LoginActivity and other improvements. (#561)
Adding error message for login(). Final touch. Refactoring LoginActivity and other improvements. Co-authored-by: opyale <opyale@noreply.gitea.io> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/561 Reviewed-by: 6543 <6543@noreply.codeberg.org>
This commit is contained in:
@@ -27,7 +27,7 @@ public class AppApiService {
|
||||
public static <S> S createService(Class<S> serviceClass, String instanceURL, Context ctx) {
|
||||
|
||||
TinyDB tinyDb = new TinyDB(ctx);
|
||||
final boolean connToInternet = AppUtil.haveNetworkConnection(ctx);
|
||||
final boolean connToInternet = AppUtil.hasNetworkConnection(ctx);
|
||||
File httpCacheDirectory = new File(ctx.getCacheDir(), "responses");
|
||||
int cacheSize = FilesData.returnOnlyNumber(tinyDb.getString("cacheSizeStr")) * 1024 * 1024;
|
||||
Cache cache = new Cache(httpCacheDirectory, cacheSize);
|
||||
|
||||
@@ -32,7 +32,7 @@ public class RetrofitClient {
|
||||
private RetrofitClient(String instanceUrl, Context ctx) {
|
||||
|
||||
TinyDB tinyDb = new TinyDB(ctx);
|
||||
final boolean connToInternet = AppUtil.haveNetworkConnection(ctx);
|
||||
final boolean connToInternet = AppUtil.hasNetworkConnection(ctx);
|
||||
int cacheSize = FilesData.returnOnlyNumber(tinyDb.getString("cacheSizeStr")) * 1024 * 1024;
|
||||
File httpCacheDirectory = new File(ctx.getCacheDir(), "responses");
|
||||
Cache cache = new Cache(httpCacheDirectory, cacheSize);
|
||||
|
||||
Reference in New Issue
Block a user