fix: show profile picture in share sheet
Shows the profile picture of the shared account in the share sheet. This was already done upstream and intended here, but was bugged due to an additional file provider.
This commit is contained in:
parent
803e66f999
commit
2e39f81c36
|
@ -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"
|
||||
|
|
|
@ -1769,9 +1769,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