Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/Qt/todo' into You/todo
Browse files Browse the repository at this point in the history
  • Loading branch information
sanhuzhen committed Sep 8, 2024
2 parents 4f820dc + 1b9b66e commit 57360f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class AddAffairViewModel : BaseViewModel() {
getLastSyncTime()
)
AffairRepository.addTodo(pushWrapper)
.mapOrInterceptException { }
.doOnError{}
.safeSubscribeBy {
it.data.syncTime.apply {
setLastSyncTime(this)
}
setLastSyncTime(it.syncTime)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class DetailActivity : BaseActivity() {
tvMinutes.gone()
tvSeconds.gone()
layout.gone()
// tvAddTodo.gone()
tvAddTodo.gone()
} else {
startDownTimer(it.activityStartAt)
}
Expand Down Expand Up @@ -310,7 +310,6 @@ class DetailActivity : BaseActivity() {

private fun otherTrans(timestampInSeconds: Long): String {
val date = Date(timestampInSeconds * 1000L)

val format = SimpleDateFormat("yyyy年MM月dd日HH:mm", Locale.getDefault())
return format.format(date)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class DetailViewModel(id: Int) : BaseViewModel() {
.addTodo(id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.mapOrInterceptException { }
.doOnError {
_isAdd.postValue(0)
}
Expand All @@ -86,14 +87,13 @@ class DetailViewModel(id: Int) : BaseViewModel() {
UFieldRepository.pushTodo(pushWrapper)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.mapOrInterceptException { }
.doOnError {
_isAdd.postValue(0)
}
.safeSubscribeBy {
it.data.syncTime.apply {
setLastSyncTime(this)
_isAdd.postValue(1)
}
setLastSyncTime(it.syncTime)
_isAdd.postValue(1)
}
}

Expand Down

0 comments on commit 57360f1

Please sign in to comment.