Skip to content

Commit

Permalink
merge with notification
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Dec 29, 2021
1 parent 5ad74b4 commit 7d4d4fe
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 542 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -768,15 +768,7 @@ class DrawerActivity : BaseStatusActivity(), bbsPrivateMessageFragment.OnNewMess
}
}

override fun setNotificationsNum(notificationsNum: noticeNumInfo) {
Log.d(TAG, "Notification fragment $notificationsFragment notification $notificationsNum")

Log.d(TAG, "notification number " + notificationsNum.allNoticeInfo)
if (notificationsFragment != null) {
notificationsFragment!!.renderTabNumber(notificationsNum)
}
setNewMessageNum(notificationsNum.allNoticeInfo)
}

override fun onCreateOptionsMenu(menu: Menu): Boolean {
// Inflate the menu; this adds items to the action bar if it is present.
Expand Down Expand Up @@ -845,4 +837,18 @@ class DrawerActivity : BaseStatusActivity(), bbsPrivateMessageFragment.OnNewMess
companion object {
private val TAG = DrawerActivity::class.java.simpleName
}



override fun setNotificationsNum(notificationsNum: noticeNumInfo) {
Log.d(TAG, "Notification fragment $notificationsFragment notification $notificationsNum")

Log.d(TAG, "notification number " + notificationsNum.allNoticeInfo)
if (notificationsFragment != null) {
notificationsFragment!!.renderTabNumber(notificationsNum)
}
if (notificationsNum != null) {
setNewMessageNum(notificationsNum.allNoticeInfo)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ import retrofit2.Response

class HotThreadsViewModel(application: Application?) : AndroidViewModel(application!!) {
private val TAG = HotThreadsViewModel::class.java.simpleName
private val mText: MutableLiveData<String>? = null
lateinit var bbsInfo: Discuz
var userBriefInfo: User? = null
private var client = OkHttpClient()
var pageNum = MutableLiveData(1)
var isLoading: MutableLiveData<Boolean>
var isLoading: MutableLiveData<Boolean> = MutableLiveData()
var totalThreadListLiveData: MutableLiveData<List<Thread>> = MutableLiveData(ArrayList())
var errorMessageMutableLiveData = MutableLiveData<ErrorMessage?>(null)
var resultMutableLiveData = MutableLiveData<DisplayThreadsResult?>()
Expand Down Expand Up @@ -110,7 +109,6 @@ class HotThreadsViewModel(application: Application?) : AndroidViewModel(applicat
}

init {
isLoading = MutableLiveData()
isLoading.postValue(false)
}
}
Loading

0 comments on commit 7d4d4fe

Please sign in to comment.