From fb1ef3212daecdfa0334f29bcc1a18cd409a64cd Mon Sep 17 00:00:00 2001 From: Neel Doshi <60827173+neeldoshii@users.noreply.github.com> Date: Sat, 30 Nov 2024 07:21:53 +0530 Subject: [PATCH] Migrated Bookmark from `Java` to `Kotlin` (#5960) * Rename Bookmark Pages from `.java` to `.kt` * Migrated Bookmark Pages to kotlin --- .../nrw/commons/bookmarks/BookmarkPages.java | 32 ------------------- .../nrw/commons/bookmarks/BookmarkPages.kt | 8 +++++ 2 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.java create mode 100644 app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.kt diff --git a/app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.java b/app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.java deleted file mode 100644 index 71690c5e29..0000000000 --- a/app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.java +++ /dev/null @@ -1,32 +0,0 @@ -package fr.free.nrw.commons.bookmarks; - -import androidx.fragment.app.Fragment; - -/** - * Data class for handling a bookmark fragment and it title - */ -public class BookmarkPages { - private Fragment page; - private String title; - - BookmarkPages(Fragment fragment, String title) { - this.title = title; - this.page = fragment; - } - - /** - * Return the fragment - * @return fragment object - */ - public Fragment getPage() { - return page; - } - - /** - * Return the fragment title - * @return title - */ - public String getTitle() { - return title; - } -} diff --git a/app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.kt b/app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.kt new file mode 100644 index 0000000000..e0ade52fe7 --- /dev/null +++ b/app/src/main/java/fr/free/nrw/commons/bookmarks/BookmarkPages.kt @@ -0,0 +1,8 @@ +package fr.free.nrw.commons.bookmarks + +import androidx.fragment.app.Fragment + +data class BookmarkPages ( + val page: Fragment? = null, + val title: String? = null +) \ No newline at end of file