mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
Simplify null and empty check
This commit is contained in:
parent
87a7c400d7
commit
0a8b7020b5
@ -121,10 +121,13 @@ public final class Utils {
|
|||||||
|
|
||||||
public static void setupCookies(final String cookieRaw) {
|
public static void setupCookies(final String cookieRaw) {
|
||||||
final CookieStore cookieStore = NET_COOKIE_MANAGER.getCookieStore();
|
final CookieStore cookieStore = NET_COOKIE_MANAGER.getCookieStore();
|
||||||
if (cookieRaw == "LOGOUT") {
|
if (cookieStore == null || isEmpty(cookieRaw)) {
|
||||||
cookieStore.removeAll();
|
return;
|
||||||
|
}
|
||||||
|
if (cookieRaw.equals("LOGOUT")) {
|
||||||
|
cookieStore.removeAll();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (cookieRaw != null && !isEmpty(cookieRaw)) {
|
|
||||||
try {
|
try {
|
||||||
final URI uri1 = new URI("https://instagram.com");
|
final URI uri1 = new URI("https://instagram.com");
|
||||||
final URI uri2 = 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);
|
if (BuildConfig.DEBUG) Log.e("AWAISKING_APP", "", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static String getUserIdFromCookie(final String cookie) {
|
public static String getUserIdFromCookie(final String cookie) {
|
||||||
|
Loading…
Reference in New Issue
Block a user