mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
handle empty filename in decrypt list
This commit is contained in:
parent
ae56f4f900
commit
36f3887c5f
@ -34,6 +34,7 @@ import android.os.Bundle;
|
||||
import android.support.v7.widget.DefaultItemAnimator;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.LayoutInflater;
|
||||
@ -476,7 +477,10 @@ public class DecryptListFragment
|
||||
KeyFormattingUtils.setStatus(mContext, holder, model.mResult);
|
||||
|
||||
OpenPgpMetadata metadata = model.mResult.getDecryptMetadata();
|
||||
holder.vFilename.setText(metadata.getFilename());
|
||||
|
||||
String filename = metadata.getFilename();
|
||||
holder.vFilename.setText(
|
||||
!TextUtils.isEmpty(filename) ? filename : mContext.getString(R.string.filename_unknown));
|
||||
|
||||
long size = metadata.getOriginalSize();
|
||||
if (size == -1 || size == 0) {
|
||||
|
@ -1334,5 +1334,6 @@
|
||||
<string name="error_loading_keys">"Error loading keys!"</string>
|
||||
<string name="error_empty_log">"(error, empty log)"</string>
|
||||
<string name="error_reading_text">"Could not read input to decrypt!"</string>
|
||||
<string name="filename_unknown"><![CDATA[<no filename>]]></string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user