Skip to content

Commit 7101fde

Browse files
Migrate Profile Package to Kotlin commons-app#6118 commons-app#5928
1 parent e60bd20 commit 7101fde

File tree

3 files changed

+179
-219
lines changed

3 files changed

+179
-219
lines changed

app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1737,10 +1737,11 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
17371737
return
17381738
}
17391739
ProfileActivity.startYourself(
1740-
activity,
1741-
media!!.user,
1742-
sessionManager.userName != media!!.user
1740+
requireActivity(), // Ensure this is a non-null Activity context
1741+
media?.user ?: "", // Provide a fallback value if media?.user is null
1742+
sessionManager.userName != media?.user // This can remain as is, null check will apply
17431743
)
1744+
17441745
}
17451746

17461747
/**

0 commit comments

Comments
 (0)