Makes the toolbar shadow visible for pre-Lollipop android versions and fixes a crash when deleting a draft with no media attached.
This commit is contained in:
parent
87600b016f
commit
f37bb694f1
17 changed files with 190 additions and 203 deletions
|
@ -131,10 +131,12 @@ public class SavedTootActivity extends BaseActivity implements SavedTootAdapter.
|
|||
// Delete any media files associated with the status.
|
||||
ArrayList<String> uris = new Gson().fromJson(item.getUrls(),
|
||||
new TypeToken<ArrayList<String>>() {}.getType());
|
||||
for (String uriString : uris) {
|
||||
Uri uri = Uri.parse(uriString);
|
||||
if (getContentResolver().delete(uri, null, null) == 0) {
|
||||
Log.e(TAG, String.format("Did not delete file %s.", uriString));
|
||||
if (uris != null) {
|
||||
for (String uriString : uris) {
|
||||
Uri uri = Uri.parse(uriString);
|
||||
if (getContentResolver().delete(uri, null, null) == 0) {
|
||||
Log.e(TAG, String.format("Did not delete file %s.", uriString));
|
||||
}
|
||||
}
|
||||
}
|
||||
// update DB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue