Use lambdas

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-12-31 00:00:24 +01:00
parent 0695d9fd73
commit 97423444ce

View file

@ -237,22 +237,12 @@ public class SwitchAccountController extends BaseController {
Log.e(TAG, "Access was denied"); Log.e(TAG, "Access was denied");
ErrorMessageHolder.getInstance().setMessageType( ErrorMessageHolder.getInstance().setMessageType(
ErrorMessageHolder.ErrorMessageType.FAILED_TO_IMPORT_ACCOUNT); ErrorMessageHolder.ErrorMessageType.FAILED_TO_IMPORT_ACCOUNT);
new Handler().post(new Runnable() { new Handler().post(() -> getRouter().popToRoot());
@Override
public void run() {
getRouter().popToRoot();
}
});
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, "Something went wrong while accessing token"); Log.e(TAG, "Something went wrong while accessing token");
ErrorMessageHolder.getInstance().setMessageType( ErrorMessageHolder.getInstance().setMessageType(
ErrorMessageHolder.ErrorMessageType.FAILED_TO_IMPORT_ACCOUNT); ErrorMessageHolder.ErrorMessageType.FAILED_TO_IMPORT_ACCOUNT);
new Handler().post(new Runnable() { new Handler().post(() -> getRouter().popToRoot());
@Override
public void run() {
getRouter().popToRoot();
}
});
} }
}, handler }, handler
); );