Skip to content

Commit

Permalink
fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Jun 13, 2017
1 parent d71407f commit a3c6dcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ public static Pair<String, SpanItem[]> formatDirectMessageText(@NonNull final Di

@NonNull
public static Pair<String, SpanItem[]> formatDirectMessageText(@NonNull final DMResponse.Entry.Message.Data message) {
final HtmlBuilder builder = new HtmlBuilder(message.getText(), false, true, false);
String text = message.getText();
if (text == null) {
text = "";
}
final HtmlBuilder builder = new HtmlBuilder(text, false, true, false);
StatusExtensionsKt.addEntities(builder, message);
return builder.buildWithIndices();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ class SignInActivity : BaseActivity(), OnClickListener, TextWatcher,
private fun showLoginTypeChooser() {
executeAfterFragmentResumed {
val fm = it.supportFragmentManager
val df = LoginTypeChooserDialogFragment()
val df = SignInTypeChooserDialogFragment()
df.show(fm, "login_type_chooser")
}
}
Expand Down Expand Up @@ -557,7 +557,7 @@ class SignInActivity : BaseActivity(), OnClickListener, TextWatcher,
finish()
}

class LoginTypeChooserDialogFragment : BaseDialogFragment(),
class SignInTypeChooserDialogFragment : BaseDialogFragment(),
LoaderManager.LoaderCallbacks<List<CustomAPIConfig>> {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val builder = AlertDialog.Builder(context)
Expand Down

0 comments on commit a3c6dcd

Please sign in to comment.