diff --git a/src/main/java/org/kde/kdeconnect/Device.java b/src/main/java/org/kde/kdeconnect/Device.java index d9e5354b..d9298de9 100644 --- a/src/main/java/org/kde/kdeconnect/Device.java +++ b/src/main/java/org/kde/kdeconnect/Device.java @@ -630,7 +630,7 @@ public class Device implements BaseLink.PackageReceiver { } public boolean hasPluginsLoaded() { - return !(plugins.isEmpty() && failedPlugins.isEmpty()); + return !plugins.isEmpty() || !failedPlugins.isEmpty(); } public void reloadPluginsFromSettings() { diff --git a/src/main/java/org/kde/kdeconnect/UserInterface/List/SectionItem.java b/src/main/java/org/kde/kdeconnect/UserInterface/List/SectionItem.java index 6dc97a83..d5159f43 100644 --- a/src/main/java/org/kde/kdeconnect/UserInterface/List/SectionItem.java +++ b/src/main/java/org/kde/kdeconnect/UserInterface/List/SectionItem.java @@ -9,11 +9,11 @@ import org.kde.kdeconnect_tp.R; public class SectionItem implements ListAdapter.Item { private final String title; - public boolean isEmpty; + public boolean isSectionEmpty; public SectionItem(String title) { this.title = title; - this.isEmpty = false; + this.isSectionEmpty = false; } @Override @@ -21,13 +21,14 @@ public class SectionItem implements ListAdapter.Item { View v = layoutInflater.inflate(R.layout.list_item_category, null); + //Make it not selectable v.setOnClickListener(null); v.setOnLongClickListener(null); TextView sectionView = (TextView) v.findViewById(R.id.list_item_category_text); sectionView.setText(title); - if (isEmpty) { + if (isSectionEmpty) { v.findViewById(R.id.list_item_category_empty_placeholder).setVisibility(View.VISIBLE); } diff --git a/src/main/java/org/kde/kdeconnect/UserInterface/MainActivity.java b/src/main/java/org/kde/kdeconnect/UserInterface/MainActivity.java index 4a5a6b13..aba13362 100644 --- a/src/main/java/org/kde/kdeconnect/UserInterface/MainActivity.java +++ b/src/main/java/org/kde/kdeconnect/UserInterface/MainActivity.java @@ -104,35 +104,35 @@ public class MainActivity extends ActionBarActivity { Resources res = getResources(); section = new SectionItem(res.getString(R.string.category_connected_devices)); - section.isEmpty = true; + section.isSectionEmpty = true; items.add(section); for(Device d : devices) { if (d.isReachable() && d.isPaired()) { items.add(new DeviceItem(MainActivity.this, d)); - section.isEmpty = false; + section.isSectionEmpty = false; } } section = new SectionItem(res.getString(R.string.category_not_paired_devices)); - section.isEmpty = true; + section.isSectionEmpty = true; items.add(section); for(Device d : devices) { if (d.isReachable() && !d.isPaired()) { items.add(new DeviceItem(MainActivity.this, d)); - section.isEmpty = false; + section.isSectionEmpty = false; } } section = new SectionItem(res.getString(R.string.category_remembered_devices)); - section.isEmpty = true; + section.isSectionEmpty = true; items.add(section); for(Device d : devices) { if (!d.isReachable() && d.isPaired()) { items.add(new DeviceItem(MainActivity.this, d)); - section.isEmpty = false; + section.isSectionEmpty = false; } } - if (section.isEmpty) { + if (section.isSectionEmpty) { items.remove(items.size()-1); //Remove remembered devices section if empty } diff --git a/src/main/java/org/kde/kdeconnect/UserInterface/ShareToReceiver.java b/src/main/java/org/kde/kdeconnect/UserInterface/ShareToReceiver.java index 947c4580..5843914f 100644 --- a/src/main/java/org/kde/kdeconnect/UserInterface/ShareToReceiver.java +++ b/src/main/java/org/kde/kdeconnect/UserInterface/ShareToReceiver.java @@ -136,7 +136,8 @@ public class ShareToReceiver extends ActionBarActivity { queuedSendUriList(device, uriList); } catch (Exception e) { - Log.e(this.getClass().getName(), e.toString()); + e.printStackTrace(); + Log.e("ShareToReceiver", "Exception"); } } else if (extras.containsKey(Intent.EXTRA_TEXT)) {