As a result, I got such a script, maybe it will be useful to someone.
const Theme = {} const user = require.main.require('./src/user') const privileges = require.main.require('./src/privileges') Theme.getUsersByCategory = async function(data) { const { templateData: { cid } } = data const allUserIds = await user.getUidsFromSet('users:joindate', 0, -1) const asyncFilter = async (arr, predicate) => { const results = await Promise.all(arr.map(predicate)) return arr.filter((element, index) => results[index]) } const availableUserIds = await asyncFilter(allUserIds, async (id) => { return await privileges.categories.can('read', cid, id) }) data.templateData.availableUsers = await user.getUsersData(availableUserIds) return data } module.exports = ThemeAny Xiaomi/MIUI users?
-
@julian yeah, you lack free MIUI music, movies and all other cool Xiaomi features. I wonder if you even have a theme store.
But then again, you seem to be a beginner with these sort of things, so be careful. People break their devices easily if they have no confidence nor experience.
-
Yeah I'm a total beginner, with no time to learn how to properly flash my device, so I might just stick with MIUI
I have a theme store, but if I click anywhere, the language resets to Chinese
, none of the themes really appeal to me, personally.