Skip to content

Commit

Permalink
ani sync
Browse files Browse the repository at this point in the history
  • Loading branch information
LagradOst committed Jan 9, 2021
1 parent f06d26c commit 8625e16
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ class ResultFragment : Fragment() {
if (holder.progress == holder.episodes) {
holder.type.value = 1
}
if(holder.progress < holder.episodes && holder.type.value == AniListStatusType.Completed.value) {
holder.type.value = AniListStatusType.Watching.value
}
if (postDataAboutId(holder.id, holder.type, holder.score, holder.progress)) {
dialog.dismiss()
requireActivity().runOnUiThread {
Expand Down Expand Up @@ -652,7 +655,15 @@ class ResultFragment : Fragment() {
button.setOnClickListener {
holder.type.value = i
thread {
postDataAboutId(holder.id, holder.type, holder.score, holder.progress)
if(postDataAboutId(holder.id, holder.type, holder.score, holder.progress)) {
if(holder.type.value == AniListStatusType.Completed.value) {
activity!!.runOnUiThread{
holder.progress = holder.episodes
aniList_progressbar.progress = 100
anilist_progress_txt.text = "${holder.episodes}/${holder.episodes}"
}
}
}
}
dialog.dismiss()
}
Expand Down

0 comments on commit 8625e16

Please sign in to comment.