Closed bestian closed 1 month ago
@bestian sorry..here comes the question how to updated the firebase Array of Objects from image1 to image 2
Thanks,teacher.(sweat smile)
or can the Array of Objects could be like this (as the image)?
Thanks,teacher.
@bestian sorry..here comes the question how to updated the firebase Array of Objects from image1 to image 2 Thanks,teacher.(sweat smile)
$uid 代表使用者的uid.
可以用set的方法
像是諸如 set(usersRef, '/' + this.uid + '/notifications/' + n, obj).then(() => { console.log('notification created')})
之類的
進度更新: 暫時更新setupGroupListeners()但尚未解決onChildAdded不適當觸發以及舊資料觸發,需研究一下snapshot的運作。
Will fight again on Tuesday, 7/30. Your suggestions are welcome!XD
在邏輯上,onChildAdded 好像在使用者在線才會觸發 是不是可以改成在Group.view的addChat函式去主動發送通知?
我寫了相關的psudocode在Group.view裡,請參考
Thank you teacher,will refer on it.Danke schön.
初步完成,但是小紅點的計數有問題,一直是0,待檢修
我猜想用watcher來監聽uid,確保uid有值時就get一次notifications,應該就可以解決了?
目前測試:
bug1:新建留言時,firebase該社團的member並不會被add新的Notification.---->後來知道了:原來是不會發notification給留言的本人,而會給其他member
bug2:更新社團簡介時,產生很多空的社團Member如下圖:--->目前初步了解,新進入的member,選擇「我要加入社團」時沒有資料
抓到的資料如下圖
新加入的成員,在friendsView.vue中的連結如下圖 undefined 而不是如舊user可以有UID https://we.alearn.org.tw/#/flag/undifiend
但是位址卻有顯示UID,如下圖
@leechiuhui 這是因為Profile.vue的updateFlag函式有問題,先嘗試修正程式碼了,但時間不足以測試。 麻煩有空用localhost測試(新建帳號 & 更新旗幟)確認修好後,deploy後,再close這個bug issue,非常感謝~
說明:在自己參與的社團若有新建的資源或留言時,可以收到notification,就不必每次登入時主動點入社團去檢查
切豆腐: