Fix a few crashing bugs

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-01-02 00:49:33 +01:00
parent 96f027726e
commit 47bc1e8bbc
2 changed files with 3 additions and 3 deletions

View file

@ -105,7 +105,7 @@ public class AccountVerificationController extends BaseController {
private boolean isAccountImport;
private String originalProtocol;
public AccountVerificationController(Bundle args) {
AccountVerificationController(Bundle args) {
super(args);
if (args != null) {
baseUrl = args.getString(BundleKeys.KEY_BASE_URL);
@ -230,7 +230,7 @@ public class AccountVerificationController extends BaseController {
@Override
public void onError(Throwable e) {
if (getActivity() != null) {
if (getActivity() != null && getResources() != null) {
getActivity().runOnUiThread(() -> progressText.setText(String.format(getResources().getString(
R.string.nc_nextcloud_talk_app_not_installed), getResources().getString(R.string.nc_app_name))));
}

View file

@ -563,7 +563,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
}
@OnClick(R.id.emptyLayout)
public void sendHello() {
void sendHello() {
if (!isHelloClicked) {
isHelloClicked = true;
sendMessage(getResources().getString(R.string.nc_hello) + " 👋", 1);