* Channel list drawer * Get channels by category * Fix and connect websocket * Fix Select first team using the team members * create loadMe and fix login actions to loads the teams * Add android back button handler for the channel drawer * Channel drawer styling and functionality * Mark channel as viewed and fixed reset unread counts * Unread above/below indicators * Improve performance replacing ScrollView with ListView * Fix unread indicators * Addressing review feedback
14 lines
456 B
JavaScript
14 lines
456 B
JavaScript
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
export function getPreferencesByCategory(myPreferences, category) {
|
|
const prefix = `${category}--`;
|
|
const preferences = new Map();
|
|
Object.keys(myPreferences).forEach((key) => {
|
|
if (key.startsWith(prefix)) {
|
|
preferences.set(key.substring(prefix.length), myPreferences[key]);
|
|
}
|
|
});
|
|
|
|
return preferences;
|
|
}
|