Skip to content

Commit 70291a0

Browse files
Migrated Java profile package to kotlin (#6119)
* Rename .java to .kt * Migrate Profile Package to Kotlin #6118 #5928 * Migrate Profile Package to Kotlin #6118 #5928 * Migrate Profile Package to Kotlin #6118 #5928
1 parent 62136b5 commit 70291a0

File tree

4 files changed

+234
-269
lines changed

4 files changed

+234
-269
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,10 +1754,11 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
17541754
return
17551755
}
17561756
ProfileActivity.startYourself(
1757-
activity,
1758-
media!!.user,
1759-
sessionManager.userName != media!!.user
1757+
requireActivity(), // Ensure this is a non-null Activity context
1758+
media?.user ?: "", // Provide a fallback value if media?.user is null
1759+
sessionManager.userName != media?.user // This can remain as is, null check will apply
17601760
)
1761+
17611762
}
17621763

17631764
/**

app/src/main/java/fr/free/nrw/commons/profile/ProfileActivity.java

Lines changed: 0 additions & 265 deletions
This file was deleted.

0 commit comments

Comments
 (0)