|
|
|
@ -1747,6 +1747,7 @@ func (cache *Cache) GetAll(refresh bool) types.Twts { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* XXX: Unused... Not sure if we should delete? (I'm normally against commenting out code :D) |
|
|
|
|
func (cache *Cache) FilterBy(filters ...FilterFunc) types.Twts { |
|
|
|
|
return FilterTwtsBy(cache.GetAll(false), filters...) |
|
|
|
|
} |
|
|
|
@ -1754,6 +1755,7 @@ func (cache *Cache) FilterBy(filters ...FilterFunc) types.Twts { |
|
|
|
|
func (cache *Cache) GroupBy(g GroupFunc) (res map[string]types.Twts) { |
|
|
|
|
return GroupTwtsBy(cache.GetAll(false), g) |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
func (cache *Cache) getMentions(u *User, refresh bool, fffs ...FilterFuncFactory) types.Twts { |
|
|
|
|
key := fmt.Sprintf("mentions:%s", u.Username) |
|
|
|
@ -1771,7 +1773,7 @@ func (cache *Cache) getMentions(u *User, refresh bool, fffs ...FilterFuncFactory |
|
|
|
|
return cached.GetTwts() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mentions := cache.FilterBy(FilterMentionsMe(cache, u)) |
|
|
|
|
mentions := FilterTwtsBy(cache.List.Twts, FilterMentionsMe(cache, u)) |
|
|
|
|
twts := cache.filterTwts(u, mentions) |
|
|
|
|
sort.Sort(twts) |
|
|
|
|
|
|
|
|
@ -1782,7 +1784,7 @@ func (cache *Cache) getMentions(u *User, refresh bool, fffs ...FilterFuncFactory |
|
|
|
|
for _, fff := range fffs { |
|
|
|
|
ffs = append(ffs, fff(cache, u)) |
|
|
|
|
} |
|
|
|
|
return FilterTwtsBy(cached.GetTwts(), ffs...) |
|
|
|
|
return FilterTwtsBy(twts, ffs...) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return twts |
|
|
|
|