Skip to content

Commit

Permalink
master - added value of to state.
Browse files Browse the repository at this point in the history
  • Loading branch information
masterwok committed Aug 1, 2018
1 parent f424c62 commit ac80de8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ class TorrentSessionStatus private constructor(
FINISHED(3),
SEEDING(4),
ALLOCATING(5),
CHECKING_RESUME_DATA(6)
CHECKING_RESUME_DATA(6);

companion object {
fun valueOf(value: Int): State = State.values().first { it.value == value }
}
}
}

0 comments on commit ac80de8

Please sign in to comment.