mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: correctly shows education text for categories
This commit is contained in:
@@ -137,11 +137,12 @@ const controllerOpts = {
|
||||
footerEducation: function() {
|
||||
if (!this.get('allLoaded') || this.get('model.topics.length') > 0 || !this.currentUser) { return; }
|
||||
|
||||
const split = (this.get('model.filter') || '').split('/');
|
||||
const segments = (this.get('model.filter') || '').split('/');
|
||||
|
||||
if (split[0] !== 'new' && split[0] !== 'unread') { return; }
|
||||
const tab = segments[segments.length - 1];
|
||||
if (tab !== 'new' && tab !== 'unread') { return; }
|
||||
|
||||
return I18n.t("topics.none.educate." + split[0], {
|
||||
return I18n.t("topics.none.educate." + tab, {
|
||||
userPrefsUrl: userPath(`${this.currentUser.get('username_lower')}/preferences`)
|
||||
});
|
||||
}.property('allLoaded', 'model.topics.length')
|
||||
|
||||
Reference in New Issue
Block a user