Skip to content

Commit

Permalink
Merge pull request #458 from FineFindus/feat/share-profile-picture
Browse files Browse the repository at this point in the history
fix: show profile picture in share sheet
  • Loading branch information
LucasGGamerM authored Jul 15, 2024
2 parents d369129 + 2e39f81 commit b9efdbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions mastodon/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1765,9 +1765,9 @@ public static void openSystemShareSheet(Context context, Object obj){
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);
}
Expand Down

0 comments on commit b9efdbb

Please sign in to comment.