@ -36,16 +36,20 @@ public class TorrentsFragment extends SherlockFragment {
@@ -36,16 +36,20 @@ public class TorrentsFragment extends SherlockFragment {
@InstanceState
protectedbooleanhasAConnection=false;
@InstanceState
protectedbooleanisLoading=false;
protectedbooleanisLoading=true;
@InstanceState
protectedStringconnectionErrorMessage=null;
// Views
@ViewById(resName="torrent_list")
@ViewById(resName="torrent_list")
protectedSherlockListViewtorrentsList;
@ViewById
protectedTextViewemptyText;
@ViewById
protectedTextViewnosettingsText;
@ViewById
protectedTextViewerrorText;
@ViewById
protectedProgressBarloadingProgress;
@AfterViews
@ -69,6 +73,7 @@ public class TorrentsFragment extends SherlockFragment {
@@ -69,6 +73,7 @@ public class TorrentsFragment extends SherlockFragment {
*Clearcurrentlyvisiblelistoftorrents
*/
publicvoidclear(){
this.connectionErrorMessage=null;
updateTorrents(null);
}
@ -89,26 +94,26 @@ public class TorrentsFragment extends SherlockFragment {
@@ -89,26 +94,26 @@ public class TorrentsFragment extends SherlockFragment {
@ -142,7 +147,7 @@ public class TorrentsFragment extends SherlockFragment {
@@ -142,7 +147,7 @@ public class TorrentsFragment extends SherlockFragment {
// TODO: Update title or otherwise show number of selected torrents?
@ -152,14 +157,14 @@ public class TorrentsFragment extends SherlockFragment {
@@ -152,14 +157,14 @@ public class TorrentsFragment extends SherlockFragment {
@ -171,8 +176,11 @@ public class TorrentsFragment extends SherlockFragment {
@@ -171,8 +176,11 @@ public class TorrentsFragment extends SherlockFragment {
clear();// Indirectly also calls updateViewVisibility()
}else{
updateViewVisibility();
}
}
/**
@ -181,8 +189,26 @@ public class TorrentsFragment extends SherlockFragment {
@@ -181,8 +189,26 @@ public class TorrentsFragment extends SherlockFragment {
*/
publicvoidupdateIsLoading(booleanisLoading){
this.isLoading=isLoading;
if(isLoading)
clear();
if(isLoading){
clear();// Indirectly also calls updateViewVisibility()
clear();// Indirectly also calls updateViewVisibility()
}else{
updateViewVisibility();
}
}
@UiThread
@ -191,14 +217,17 @@ public class TorrentsFragment extends SherlockFragment {
@@ -191,14 +217,17 @@ public class TorrentsFragment extends SherlockFragment {
@ -33,11 +33,11 @@ public class TorrentFileView extends CheckableRelativeLayout {
@@ -33,11 +33,11 @@ public class TorrentFileView extends CheckableRelativeLayout {
@ -40,6 +40,8 @@ public class SystemSettingsActivity extends SherlockPreferenceActivity {
@@ -40,6 +40,8 @@ public class SystemSettingsActivity extends SherlockPreferenceActivity {
@ -59,6 +61,22 @@ public class SystemSettingsActivity extends SherlockPreferenceActivity {
@@ -59,6 +61,22 @@ public class SystemSettingsActivity extends SherlockPreferenceActivity {