Merge pull request #458 from FineFindus/feat/share-profile-picture
fix: show profile picture in share sheet
This commit is contained in:
commit
b9efdbbb40
|
@ -105,16 +105,6 @@
|
|||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<provider
|
||||
android:name="org.joinmastodon.android.utils.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<provider
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:name=".TweakedFileProvider"
|
||||
|
|
|
@ -1765,9 +1765,9 @@ public class UiUtils {
|
|||
ImageCache cache=ImageCache.getInstance(context);
|
||||
try{
|
||||
File ava=cache.getFile(new UrlImageLoaderRequest(account.avatarStatic));
|
||||
if(!ava.exists())
|
||||
if(ava==null || !ava.exists())
|
||||
ava=cache.getFile(new UrlImageLoaderRequest(account.avatar));
|
||||
if(ava.exists()){
|
||||
if(ava!=null && ava.exists()){
|
||||
intent.setClipData(ClipData.newRawUri(null, getFileProviderUri(context, ava)));
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue