bug fix, added placeholder for empty reply username

This commit is contained in:
nuclearfog 2022-12-04 21:11:56 +01:00
parent d2f40f21f7
commit cb6145d402
No known key found for this signature in database
GPG Key ID: 03488A185C476379
5 changed files with 11 additions and 3 deletions

View File

@ -166,7 +166,10 @@ public class StatusHolder extends ViewHolder implements OnClickListener {
if (status.getRepliedStatusId() > 0) {
replyIcon.setVisibility(View.VISIBLE);
replyname.setVisibility(View.VISIBLE);
replyname.setText(status.getReplyName());
if (!status.getReplyName().isEmpty())
replyname.setText(status.getReplyName());
else
replyname.setText(R.string.status_replyname_empty);
} else {
replyIcon.setVisibility(View.GONE);
replyname.setVisibility(View.GONE);

View File

@ -59,7 +59,7 @@ public class AccountDatabase {
values.put(AccountTable.CLIENT_SECRET, account.getConsumerSecret());
values.put(AccountTable.API, account.getApiType());
values.put(AccountTable.ACCESS_TOKEN, account.getOauthToken());
values.put(AccountTable.ACCESS_TOKEN, account.getOauthToken());
values.put(AccountTable.TOKEN_SECRET, account.getOauthSecret());
values.put(AccountTable.BEARER, account.getBearerToken());
SQLiteDatabase db = dataHelper.getDatabase();
db.beginTransaction();

View File

@ -675,7 +675,10 @@ public class StatusActivity extends AppCompatActivity implements OnClickListener
statusText.setVisibility(GONE);
}
if (status.getRepliedStatusId() > 0) {
replyName.setText(status.getReplyName());
if (!status.getReplyName().isEmpty())
replyName.setText(status.getReplyName());
else
replyName.setText(R.string.status_replyname_empty);
replyName.setVisibility(VISIBLE);
} else {
replyName.setVisibility(GONE);

View File

@ -249,4 +249,5 @@
<string name="error_empty_token">Bitte Schlüssel hinzufügen</string>
<string name="info_account_selected">%1$s ausgewählt</string>
<string name="menu_message">Nachricht schreiben</string>
<string name="status_replyname_empty">Antwort</string>
</resources>

View File

@ -284,5 +284,6 @@
<string name="info_user_follow_request">%1$s request to follow you</string>
<string name="info_user_mention">%1$s mentioned you</string>
<string name="info_user_repost">%1$s reposted your status</string>
<string name="status_replyname_empty">Reply</string>
</resources>