浏览代码

All events in Kotlin

len 9 年之前
父节点
当前提交
6b326cfb79

+ 0 - 13
app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.java

@@ -1,13 +0,0 @@
-package eu.kanade.tachiyomi.event;
-
-public class ChapterCountEvent {
-    private int count;
-
-    public ChapterCountEvent(int count) {
-        this.count = count;
-    }
-
-    public int getCount() {
-        return count;
-    }
-}

+ 3 - 0
app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.kt

@@ -0,0 +1,3 @@
+package eu.kanade.tachiyomi.event
+
+class ChapterCountEvent(val count: Int)

+ 0 - 24
app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.java

@@ -1,24 +0,0 @@
-package eu.kanade.tachiyomi.event;
-
-import java.util.List;
-
-import eu.kanade.tachiyomi.data.database.models.Chapter;
-import eu.kanade.tachiyomi.data.database.models.Manga;
-
-public class DownloadChaptersEvent {
-    private Manga manga;
-    private List<Chapter> chapters;
-
-    public DownloadChaptersEvent(Manga manga, List<Chapter> chapters) {
-        this.manga = manga;
-        this.chapters = chapters;
-    }
-
-    public Manga getManga() {
-        return manga;
-    }
-
-    public List<Chapter> getChapters() {
-        return chapters;
-    }
-}

+ 6 - 0
app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.kt

@@ -0,0 +1,6 @@
+package eu.kanade.tachiyomi.event
+
+import eu.kanade.tachiyomi.data.database.models.Chapter
+import eu.kanade.tachiyomi.data.database.models.Manga
+
+class DownloadChaptersEvent(val manga: Manga, val chapters: List<Chapter>)

+ 0 - 12
app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.java

@@ -1,12 +0,0 @@
-package eu.kanade.tachiyomi.event;
-
-import eu.kanade.tachiyomi.data.database.models.Manga;
-
-public class MangaEvent {
-
-    public final Manga manga;
-
-    public MangaEvent(Manga manga) {
-        this.manga = manga;
-    }
-}

+ 5 - 0
app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.kt

@@ -0,0 +1,5 @@
+package eu.kanade.tachiyomi.event
+
+import eu.kanade.tachiyomi.data.database.models.Manga
+
+class MangaEvent(val manga: Manga)

+ 0 - 30
app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.java

@@ -1,30 +0,0 @@
-package eu.kanade.tachiyomi.event;
-
-import eu.kanade.tachiyomi.data.database.models.Chapter;
-import eu.kanade.tachiyomi.data.database.models.Manga;
-import eu.kanade.tachiyomi.data.source.base.Source;
-
-public class ReaderEvent {
-
-    private Source source;
-    private Manga manga;
-    private Chapter chapter;
-
-    public ReaderEvent(Source source, Manga manga, Chapter chapter) {
-        this.source = source;
-        this.manga = manga;
-        this.chapter = chapter;
-    }
-
-    public Source getSource() {
-        return source;
-    }
-
-    public Manga getManga() {
-        return manga;
-    }
-
-    public Chapter getChapter() {
-        return chapter;
-    }
-}

+ 7 - 0
app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.kt

@@ -0,0 +1,7 @@
+package eu.kanade.tachiyomi.event
+
+import eu.kanade.tachiyomi.data.database.models.Chapter
+import eu.kanade.tachiyomi.data.database.models.Manga
+import eu.kanade.tachiyomi.data.source.base.Source
+
+class ReaderEvent(val source: Source, val manga: Manga, val chapter: Chapter)