mirror of
https://github.com/zoriya/flood.git
synced 2026-05-27 09:01:58 +00:00
Fix status icon priority
This commit is contained in:
@@ -16,24 +16,27 @@ const STATUS_ICON_MAP = {
|
||||
export function torrentStatusIcons(status) {
|
||||
let statusString;
|
||||
let statusConditions = {
|
||||
hashChecking: [status.indexOf(propsMap.clientStatus.checking) > -1],
|
||||
error: [status.indexOf(propsMap.clientStatus.error) > -1],
|
||||
paused: [status.indexOf(propsMap.clientStatus.paused) > -1],
|
||||
stopped: [status.indexOf(propsMap.clientStatus.stopped) > -1],
|
||||
running: [
|
||||
status.indexOf(propsMap.clientStatus.downloading) > -1,
|
||||
status.indexOf(propsMap.clientStatus.seeding) > -1
|
||||
],
|
||||
hashChecking: [status.indexOf(propsMap.clientStatus.checking) > -1]
|
||||
]
|
||||
};
|
||||
|
||||
Object.keys(statusConditions).some((status) => {
|
||||
let conditions = statusConditions[status];
|
||||
|
||||
conditions.some((condition) => {
|
||||
if (condition) {
|
||||
statusString = status;
|
||||
}
|
||||
return condition;
|
||||
});
|
||||
|
||||
return statusString != null;
|
||||
});
|
||||
|
||||
return STATUS_ICON_MAP[statusString];
|
||||
|
||||
Reference in New Issue
Block a user