Skip to content

Commit

Permalink
fix: widget reset
Browse files Browse the repository at this point in the history
  • Loading branch information
rudrankbasant committed Feb 28, 2024
1 parent 5ad1322 commit a0f709c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/main/java/com/dscvit/vitty/widget/TodayWidget.kt
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,16 @@ suspend fun fetchTodayData(
}


if (cachedData == null) {

APICommunityRestClient.instance.getUserWithTimeTable(token, username,

object : RetrofitSelfUserListener {
override fun onSuccess(call: Call<UserResponse>?, response: UserResponse?) {
//clear the lists
courseList.clear()
timeList.clear()
roomList.clear()

val user = response

//cache response for widget
Expand Down Expand Up @@ -336,7 +341,7 @@ suspend fun fetchTodayData(

}
})
}



}
Expand Down

0 comments on commit a0f709c

Please sign in to comment.