Fix loading recent calls with non-operational DB

This commit is contained in:
xynngh 2020-07-02 19:43:46 +04:00
parent 8179fd5e60
commit 229e155cc7
1 changed files with 1 additions and 7 deletions

View File

@ -24,7 +24,6 @@ import java.util.List;
import dummydomain.yetanothercallblocker.data.CallLogHelper;
import dummydomain.yetanothercallblocker.data.CallLogItem;
import dummydomain.yetanothercallblocker.data.DatabaseSingleton;
import dummydomain.yetanothercallblocker.data.NumberInfo;
import dummydomain.yetanothercallblocker.event.CallEndedEvent;
import dummydomain.yetanothercallblocker.event.MainDbDownloadFinishedEvent;
import dummydomain.yetanothercallblocker.event.MainDbDownloadingEvent;
@ -223,12 +222,7 @@ public class MainActivity extends AppCompatActivity {
MainActivity.this, settings.getNumberOfRecentCalls());
for (CallLogItem item : items) {
if (DatabaseSingleton.getCommunityDatabase().isOperational()) {
item.numberInfo = DatabaseSingleton.getNumberInfo(item.number);
} else {
item.numberInfo = new NumberInfo();
item.numberInfo.number = item.number;
}
item.numberInfo = DatabaseSingleton.getNumberInfo(item.number);
}
return items;