Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
Release 4.1.9
Browse files Browse the repository at this point in the history
* Removed "Sort by" from Settings.
* Fixed issue when loading torrent details
* Fixed issue when choosing a server in Settings for the Free version
  • Loading branch information
lgallard committed Sep 27, 2015
1 parent 93c42da commit 7ab903f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/pro/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/free/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ android {
productFlavors {
pro {
applicationId 'com.lgallardo.qbittorrentclientpro'
versionName '4.1.8'
versionName '4.1.9'
minSdkVersion 14
targetSdkVersion 21
versionCode 418
versionCode 419
archivesBaseName = "qBittorrentController_v" + versionName
}
free {
applicationId "com.lgallardo.qbittorrentclient"
versionName '4.1.8'
versionName '4.1.9'
minSdkVersion 14
targetSdkVersion 21
versionCode 418
versionCode 419
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
private EditTextPreference connection_timeout;
private EditTextPreference data_timeout;

private ListPreference sortBy;
private CheckBoxPreference reverse_order;

private CheckBoxPreference dark_ui;

private CheckBoxPreference enable_notifications;
Expand Down Expand Up @@ -74,8 +71,6 @@ protected void onCreate(Bundle savedInstanceState) {
refresh_period = (ListPreference) findPreference("refresh_period");
connection_timeout = (EditTextPreference) findPreference("connection_timeout");
data_timeout = (EditTextPreference) findPreference("data_timeout");
sortBy = (ListPreference) findPreference("sortby");
reverse_order = (CheckBoxPreference) findPreference("reverse_order");

dark_ui = (CheckBoxPreference) findPreference("dark_ui");

Expand All @@ -93,6 +88,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {

if (MainActivity.packageName.equals("com.lgallardo.qbittorrentclient")) {


Builder builder = new Builder(SettingsActivity.this);

// Message
Expand All @@ -110,13 +106,22 @@ public void onClick(DialogInterface dialog, int id) {
});

// Create dialog
AlertDialog dialog = builder.create();
final AlertDialog dialog = builder.create();

// This detects if the back button was press while showing the dialog
dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
//do whatever you want the back key to do
// Set first server
currentServer.setValueIndex(0);

}
});

// Show dialog
dialog.show();

// Set first server
currentServer.setValueIndex(0);

} else {

Expand Down Expand Up @@ -201,12 +206,6 @@ public void getQBittorrentServerValues(String value) {
data_timeout.setText(sharedPrefs.getString("data_timeout" + value, "20"));
data_timeout.setSummary(sharedPrefs.getString("data_timeout" + value, "20"));

if (sortBy.getEntry() == null) {
sortBy.setValueIndex(1);
}

sortBy.setSummary(sortBy.getEntry());
reverse_order.setChecked(sharedPrefs.getBoolean("reverse_order" + value, false));

dark_ui.setChecked(sharedPrefs.getBoolean("dark_ui", false));

Expand All @@ -226,7 +225,6 @@ public void refreshScreenValues() {
port.setSummary(port.getText());
username.setSummary(username.getText());
refresh_period.setSummary(refresh_period.getEntry());
sortBy.setSummary(sortBy.getEntry());
notification_period.setSummary(notification_period.getEntry());
connection_timeout.setSummary(connection_timeout.getText());
data_timeout.setSummary(data_timeout.getText());
Expand All @@ -242,6 +240,7 @@ public void saveQBittorrentServerValues() {

Editor editor = sharedPrefs.edit();


if (hostname.getText().toString() != null && hostname.getText().toString() != "") {
editor.putString("hostname" + currentServerValue, hostname.getText().toString());
}
Expand Down Expand Up @@ -275,8 +274,6 @@ public void saveQBittorrentServerValues() {
editor.putString("data_timeout", data_timeout.getText().toString());
}

editor.putBoolean("reverse_order" + currentServerValue, reverse_order.isChecked());

editor.putBoolean("dark_ui" + currentServerValue, dark_ui.isChecked());

// Commit changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ public void onRefresh() {
}

// Hide herderInfo and title in phone's view
if (getActivity().findViewById(R.id.one_frame) != null) {
if (getActivity().findViewById(R.id.one_frame) != null && MainActivity.headerInfo != null) {
MainActivity.headerInfo.setVisibility(View.GONE);
// ((MainActivity) getActivity()).getSupportActionBar().setDisplayShowTitleEnabled(false);

((MainActivity) getActivity()).setTitle("");
}
Expand Down
17 changes: 0 additions & 17 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,23 +132,6 @@
android:title="@string/settings_qbittorrent_notifications_period_title" />
</PreferenceCategory>

<PreferenceCategory
android:key="sort"
android:title="@string/settings_qbittorrent_sort_category">
<ListPreference
android:defaultValue="@string/torrent_details_time_elapsed"
android:entries="@array/sortBy"
android:entryValues="@array/sortByValues"
android:key="sortby"
android:summary="@string/settings_qbittorrent_sortby_summary"
android:title="@string/settings_qbittorrent_sortby_dialog_title" />

<CheckBoxPreference
android:defaultValue="false"
android:key="reverse_order"
android:summary="@string/settings_qbittorrent_reverse_order_summary"
android:title="@string/settings_qbittorrent_reverse_order_dialog_title" />
</PreferenceCategory>
<PreferenceCategory
android:key="appearance"
android:title="@string/settings_qbittorrent_appearance_category">
Expand Down

0 comments on commit 7ab903f

Please sign in to comment.