1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 14:47:29 +00:00

Simplify null and empty check

This commit is contained in:
Ammar Githam 2020-08-16 05:33:04 +09:00
parent 87a7c400d7
commit 0a8b7020b5

View File

@ -121,10 +121,13 @@ public final class Utils {
public static void setupCookies(final String cookieRaw) {
final CookieStore cookieStore = NET_COOKIE_MANAGER.getCookieStore();
if (cookieRaw == "LOGOUT") {
cookieStore.removeAll();
if (cookieStore == null || isEmpty(cookieRaw)) {
return;
}
if (cookieRaw.equals("LOGOUT")) {
cookieStore.removeAll();
return;
}
else if (cookieRaw != null && !isEmpty(cookieRaw)) {
try {
final URI uri1 = new URI("https://instagram.com");
final URI uri2 = new URI("https://instagram.com/");
@ -145,7 +148,6 @@ public final class Utils {
if (BuildConfig.DEBUG) Log.e("AWAISKING_APP", "", e);
}
}
}
@Nullable
public static String getUserIdFromCookie(final String cookie) {