Skip to content
This repository was archived by the owner on Feb 25, 2022. It is now read-only.
This repository was archived by the owner on Feb 25, 2022. It is now read-only.

模仿蘆葦島提供時間線屏蔽的可能性 #98

@WUGqnwvMQPzl

Description

@WUGqnwvMQPzl

今天有很多人抱怨LOL相關內容霸佔時間線的問題,說到蘆葦島有時間線屏蔽的功能

不知道能不能在紫島裏也提供這一功能

我目前的想法是直接利用紫島的板塊隱藏功能,在 ListActivity 下手,檢測某個板塊是否隱藏,然後屏蔽某個板塊的串:

while (postIterator.hasNext()) {
    Post post = postIterator.next();
    // 獲取串所發表的板塊
    ACForumRaw postForum = DB.getACForumForForumid(post.getNMBFid());
    // 然後檢查是否屬於隱藏狀態
    // 檢查 postForum 是否爲 null,是因爲前面的方法可能會拋出空指針
    boolean flag = postForum != null && !postForum.getVisibility();
    if (PostIgnoreUtils.INSTANCE.checkPostIgnored(post.getNMBPostId()) || flag)
        postIterator.remove();
}

在下測試時基本沒什麼問題,不過可能長久使用下去是否會出現因爲屏蔽過多的串,然後出現異常的情況?

不知道還有什麼更好的方法可以屏蔽整一板塊的串,或許最好的解決方案是逼A島在後端實現這一功能

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions