Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added UpdateUsefuleness in usecase #268

Conversation

kyho4515
Copy link
Contributor

@kyho4515 kyho4515 commented Aug 15, 2021

👏 解決掉的 issue / Resolved Issues

📝 相關的 issue / Related Issues

⛏ 變更內容 / Details of Changes

  • 增加usecase裏的UpdateUsefulness

internal/usecase/article.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2021

Codecov Report

Merging #268 (fcf6a69) into development (db1d8a2) will decrease coverage by 0.16%.
The diff coverage is 30.95%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #268      +/-   ##
===============================================
- Coverage        44.41%   44.24%   -0.17%     
===============================================
  Files               29       29              
  Lines             1664     1704      +40     
===============================================
+ Hits               739      754      +15     
- Misses             822      841      +19     
- Partials           103      109       +6     
Impacted Files Coverage Δ
internal/repository/article.go 0.00% <0.00%> (ø)
internal/usecase/article.go 34.28% <43.33%> (+7.45%) ⬆️
internal/usecase/board.go 33.33% <0.00%> (+2.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db1d8a2...fcf6a69. Read the comment docs.

…search condition back to the original design.
@kyho4515 kyho4515 marked this pull request as ready for review August 31, 2021 07:24
@kyho4515 kyho4515 changed the title Added UpdateUsefuleness in usecase (wait for repo's function) Added UpdateUsefuleness in usecase Aug 31, 2021
@kyho4515
Copy link
Contributor Author

test function我不確定怎麼寫比較好, 如果有什麼建議都可以提出來

@y2468101216
Copy link
Collaborator

LGTM

@nickyanggg
Copy link
Collaborator

另外想問一下,目前的實作方式是不是無法避免其他使用者的刻意留言?也就是說假如有人的留言帶有其他使者的名字以及推噓文符號,是不是那位被提到的使用者在推噓文的時候就會計算到別人的刻意留言?

@kyho4515
Copy link
Contributor Author

kyho4515 commented Sep 3, 2021

另外想問一下,目前的實作方式是不是無法避免其他使用者的刻意留言?也就是說假如有人的留言帶有其他使者的名字以及推噓文符號,是不是那位被提到的使用者在推噓文的時候就會計算到別人的刻意留言?

目前看起來是這樣, 如果多加個檢查上下箭頭前一個rune是否為 \n 不知道能不能處理這個問題?

@y2468101216
Copy link
Collaborator

y2468101216 commented Sep 3, 2021

另外想問一下,目前的實作方式是不是無法避免其他使用者的刻意留言?也就是說假如有人的留言帶有其他使者的名字以及推噓文符號,是不是那位被提到的使用者在推噓文的時候就會計算到別人的刻意留言?

目前看起來是這樣, 如果多加個檢查上下箭頭前一個rune是否為 \n 不知道能不能處理這個問題?

我個人認為依照 ptt 現行做法怎樣都會被有心人操弄,因為畢竟寫入推文的時候我們不會刻意去檢查推文是否有含上下箭頭
多 + \n 也只是避免一般使用者誤碰而已,不過我覺得這個想法很好,能避免一般使用者誤觸就夠了,剩下的靠版主處理

@kyho4515
Copy link
Contributor Author

kyho4515 commented Sep 4, 2021

另外想問一下,目前的實作方式是不是無法避免其他使用者的刻意留言?也就是說假如有人的留言帶有其他使者的名字以及推噓文符號,是不是那位被提到的使用者在推噓文的時候就會計算到別人的刻意留言?

目前看起來是這樣, 如果多加個檢查上下箭頭前一個rune是否為 \n 不知道能不能處理這個問題?

我個人認為依照 ptt 現行做法怎樣都會被有心人操弄,因為畢竟寫入推文的時候我們不會刻意去檢查推文是否有含上下箭頭
多 + \n 也只是避免一般使用者誤碰而已,不過我覺得這個想法很好,能避免一般使用者誤觸就夠了,剩下的靠版主處理

我想的是在寫入的時候, \n(換行)之後加個之類的做區別, 所以推文時就是\n↑, 使用者使用換行的話就是\n→
我以為平常在ppt上看到的換行看起來就像換行後有個右箭頭?

Copy link
Member

@PichuChen PichuChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PichuChen PichuChen merged commit 785d34e into Ptt-official-app:development Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[主線] [PTT] 實作上下箭頭推文 - usecase
5 participants