Removed osmo groups from showing on dashboard
This commit is contained in:
parent
d6524260a7
commit
774f5c14c3
2 changed files with 19 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/expandable_list_item_background"
|
||||||
android:minHeight="@dimen/dashListItemHeight"
|
android:minHeight="@dimen/dashListItemHeight"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
|
@ -174,17 +174,29 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String trackerId = plugin.getService().getMyGroupTrackerId();
|
||||||
List<OsMoGroupsStorage.OsMoDevice> devices =
|
List<OsMoGroupsStorage.OsMoDevice> devices =
|
||||||
new ArrayList<>(mainGroup.getVisibleGroupUsers(plugin.getService().getMyGroupTrackerId()));
|
new ArrayList<>(mainGroup.getVisibleGroupUsers(trackerId));
|
||||||
|
|
||||||
while (devices.size() > 3) {
|
if (devices.size() > 3) {
|
||||||
devices.remove(devices.size() - 1);
|
while (devices.size() > 3) {
|
||||||
|
devices.remove(devices.size() - 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (groups.size() > 0){
|
||||||
|
for (OsMoGroupsStorage.OsMoGroup grp : groups) {
|
||||||
|
if (grp.getVisibleGroupUsers(trackerId).size() > 0) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setupDeviceViews(contentList, devices);
|
setupDeviceViews(contentList, devices);
|
||||||
if (devices.size() < 3 && groups.size() > 0) {
|
// if (devices.size() < 3 && groups.size() > 0) {
|
||||||
setupGroupsViews(3 - devices.size(), groups, contentList);
|
// setupGroupsViews(3 - devices.size(), groups, contentList);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private LinearLayout getClearContentList(View mainView) {
|
private LinearLayout getClearContentList(View mainView) {
|
||||||
|
|
Loading…
Reference in a new issue