From d1a4a7060efffcc29dce23231c88bfc4ae0623b8 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Wed, 24 Apr 2019 23:30:29 +0200 Subject: [PATCH] Fixes #496 with missing sort order names in widget config --- .../core/gui/lists/SortByListItem.java | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/org/transdroid/core/gui/lists/SortByListItem.java b/app/src/main/java/org/transdroid/core/gui/lists/SortByListItem.java index 23fbc823..274ad341 100644 --- a/app/src/main/java/org/transdroid/core/gui/lists/SortByListItem.java +++ b/app/src/main/java/org/transdroid/core/gui/lists/SortByListItem.java @@ -16,11 +16,10 @@ */ package org.transdroid.core.gui.lists; +import android.content.Context; import org.transdroid.R; import org.transdroid.daemon.TorrentsSortBy; -import android.content.Context; - /** * Represents a way in which a torrents list can be sorted. * @author Eric Kok @@ -33,24 +32,33 @@ public class SortByListItem implements SimpleListItem { public SortByListItem(Context context, TorrentsSortBy sortBy) { this.sortBy = sortBy; switch (sortBy) { - case DateAdded: - this.name = context.getString(R.string.action_sort_added); - break; - case DateDone: - this.name = context.getString(R.string.action_sort_done); - break; - case Ratio: - this.name = context.getString(R.string.action_sort_ratio); - break; - case Status: - this.name = context.getString(R.string.action_sort_status); - break; - case UploadSpeed: - this.name = context.getString(R.string.action_sort_upspeed); - break; - default: - this.name = context.getString(R.string.action_sort_alpha); - break; + case DateAdded: + this.name = context.getString(R.string.action_sort_added); + break; + case DateDone: + this.name = context.getString(R.string.action_sort_done); + break; + case Ratio: + this.name = context.getString(R.string.action_sort_ratio); + break; + case Status: + this.name = context.getString(R.string.action_sort_status); + break; + case UploadSpeed: + this.name = context.getString(R.string.action_sort_upspeed); + break; + case DownloadSpeed: + this.name = context.getString(R.string.action_sort_downspeed); + break; + case Percent: + this.name = context.getString(R.string.action_sort_percent); + break; + case Size: + this.name = context.getString(R.string.action_sort_size); + break; + default: + this.name = context.getString(R.string.action_sort_alpha); + break; } }