Commit 641cc02b authored by Grigory Fedorov's avatar Grigory Fedorov

Empty statuses do not saved.

parent 79fd3de0
...@@ -857,7 +857,10 @@ public class AccountManager implements OnLoadListener, OnWipeListener { ...@@ -857,7 +857,10 @@ public class AccountManager implements OnLoadListener, OnWipeListener {
* @param statusText * @param statusText
*/ */
public void setStatus(String account, StatusMode statusMode, String statusText) { public void setStatus(String account, StatusMode statusMode, String statusText) {
addSavedStatus(statusMode, statusText); if (statusText != null && !statusText.trim().isEmpty()) {
addSavedStatus(statusMode, statusText);
}
AccountItem accountItem = getAccount(account); AccountItem accountItem = getAccount(account);
setStatus(accountItem, statusMode, statusText); setStatus(accountItem, statusMode, statusText);
try { try {
......
...@@ -118,8 +118,6 @@ class StatusTable extends AbstractTable { ...@@ -118,8 +118,6 @@ class StatusTable extends AbstractTable {
} }
void write(StatusMode statusMode, String statusText) { void write(StatusMode statusMode, String statusText) {
if (statusText == null)
statusText = "";
synchronized (writeLock) { synchronized (writeLock) {
if (writeStatement == null) { if (writeStatement == null) {
SQLiteDatabase db = databaseManager.getWritableDatabase(); SQLiteDatabase db = databaseManager.getWritableDatabase();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment