mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix #1043 - Fix a crash when adding a followed tag in empty list
This commit is contained in:
parent
13946fe56e
commit
ecd25badf7
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ public class FollowedTagActivity extends BaseBarActivity implements FollowedTagA
|
||||||
popupAddFollowedTagtBinding.addTag.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
popupAddFollowedTagtBinding.addTag.setFilters(new InputFilter[]{new InputFilter.LengthFilter(255)});
|
||||||
dialogBuilder.setPositiveButton(R.string.validate, (dialog, id) -> {
|
dialogBuilder.setPositiveButton(R.string.validate, (dialog, id) -> {
|
||||||
String name = Objects.requireNonNull(popupAddFollowedTagtBinding.addTag.getText()).toString().trim();
|
String name = Objects.requireNonNull(popupAddFollowedTagtBinding.addTag.getText()).toString().trim();
|
||||||
if (tagList.contains(new Tag(name))) {
|
if (tagList != null && tagList.contains(new Tag(name))) {
|
||||||
Toasty.error(FollowedTagActivity.this, getString(R.string.tag_already_followed), Toasty.LENGTH_LONG).show();
|
Toasty.error(FollowedTagActivity.this, getString(R.string.tag_already_followed), Toasty.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue