mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-02-18 12:50:36 +01:00
Fix opening info dialog from MainActivity when DB is not operational
This commit is contained in:
parent
693bd02f30
commit
0b633ce5d1
@ -222,9 +222,12 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
List<CallLogItem> items = CallLogHelper.getRecentCalls(MainActivity.this, 20);
|
List<CallLogItem> items = CallLogHelper.getRecentCalls(MainActivity.this, 20);
|
||||||
|
|
||||||
for (CallLogItem item : items) {
|
for (CallLogItem item : items) {
|
||||||
item.numberInfo = DatabaseSingleton.getCommunityDatabase().isOperational()
|
if (DatabaseSingleton.getCommunityDatabase().isOperational()) {
|
||||||
? DatabaseSingleton.getNumberInfo(item.number)
|
item.numberInfo = DatabaseSingleton.getNumberInfo(item.number);
|
||||||
: new NumberInfo();
|
} else {
|
||||||
|
item.numberInfo = new NumberInfo();
|
||||||
|
item.numberInfo.number = item.number;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user