From 6b326cfb79d744fa9554c9f1e061fe72b13c10ba Mon Sep 17 00:00:00 2001 From: len Date: Sat, 19 Mar 2016 00:16:27 +0100 Subject: [PATCH] All events in Kotlin --- .../tachiyomi/event/ChapterCountEvent.java | 13 -------- .../tachiyomi/event/ChapterCountEvent.kt | 3 ++ .../event/DownloadChaptersEvent.java | 24 --------------- .../tachiyomi/event/DownloadChaptersEvent.kt | 6 ++++ .../eu/kanade/tachiyomi/event/MangaEvent.java | 12 -------- .../eu/kanade/tachiyomi/event/MangaEvent.kt | 5 ++++ .../kanade/tachiyomi/event/ReaderEvent.java | 30 ------------------- .../eu/kanade/tachiyomi/event/ReaderEvent.kt | 7 +++++ 8 files changed, 21 insertions(+), 79 deletions(-) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.java create mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.kt delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.java create mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.kt delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.java create mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.kt delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.java create mode 100644 app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.kt diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.java b/app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.java deleted file mode 100644 index 6e336925c..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.java +++ /dev/null @@ -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; - } -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.kt b/app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.kt new file mode 100644 index 000000000..85c9c6f32 --- /dev/null +++ b/app/src/main/java/eu/kanade/tachiyomi/event/ChapterCountEvent.kt @@ -0,0 +1,3 @@ +package eu.kanade.tachiyomi.event + +class ChapterCountEvent(val count: Int) diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.java b/app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.java deleted file mode 100644 index 1b9a5d08b..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.java +++ /dev/null @@ -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 chapters; - - public DownloadChaptersEvent(Manga manga, List chapters) { - this.manga = manga; - this.chapters = chapters; - } - - public Manga getManga() { - return manga; - } - - public List getChapters() { - return chapters; - } -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.kt b/app/src/main/java/eu/kanade/tachiyomi/event/DownloadChaptersEvent.kt new file mode 100644 index 000000000..8e7483c4e --- /dev/null +++ b/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) diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.java b/app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.java deleted file mode 100644 index 9cfa8d173..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.java +++ /dev/null @@ -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; - } -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.kt b/app/src/main/java/eu/kanade/tachiyomi/event/MangaEvent.kt new file mode 100644 index 000000000..e1168e1b4 --- /dev/null +++ b/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) diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.java b/app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.java deleted file mode 100644 index 6126d0a7e..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.java +++ /dev/null @@ -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; - } -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.kt b/app/src/main/java/eu/kanade/tachiyomi/event/ReaderEvent.kt new file mode 100644 index 000000000..b61f4c94d --- /dev/null +++ b/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)