Skip to content

Commit

Permalink
fixed issues #11 #7 #4
Browse files Browse the repository at this point in the history
  • Loading branch information
genemars committed Sep 21, 2015
1 parent 869de5c commit a272352
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
1 change: 0 additions & 1 deletion HomeGenieAndroid/HomeGenie/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<activity
android:name="com.glabs.homegenie.StartActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait"
android:label="@string/app_name"
>
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public class StartActivity extends FragmentActivity implements EventSourceListen
@Override
public void run() {
mGroupsViewFragment.UpdateCurrentGroupModules();
mGroupsViewFragment.UpdateCurrentGroupMenu();
Fragment widgetPopup = getSupportFragmentManager().findFragmentByTag("WIDGET");
if (widgetPopup != null && widgetPopup instanceof ModuleDialogFragment) {
((ModuleDialogFragment) widgetPopup).refreshView();
Expand Down Expand Up @@ -144,10 +145,12 @@ public void onResume() {
if (!_isPaused) {
homegenieConnect();
} else {
loaderShow();
Control.resume(new Control.GetGroupModulesCallback() {
@Override
public void groupModulesUpdated(ArrayList<Module> modules) {
updateView();
loaderHide();
}
});
}
Expand Down Expand Up @@ -468,10 +471,14 @@ public void imageDownloaded(String url, Bitmap downloadedImage) {
}
displayName = module.getDisplayName() + " (" + module.getDisplayAddress() + ")";
if (mGroupsViewFragment != null) {
mGroupsViewFragment.RefreshView();
Fragment widgetPopup = getSupportFragmentManager().findFragmentByTag("WIDGET");
if (widgetPopup != null && widgetPopup instanceof ModuleDialogFragment) {
((ModuleDialogFragment) widgetPopup).refreshView();
try {
mGroupsViewFragment.RefreshView();
Fragment widgetPopup = getSupportFragmentManager().findFragmentByTag("WIDGET");
if (widgetPopup != null && widgetPopup instanceof ModuleDialogFragment) {
((ModuleDialogFragment) widgetPopup).refreshView();
}
} catch (Exception e) {
//Log.d("onSseEvent", e.getMessage());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ protected void _updatePropertyBox(View convertView, int boxResId, String label,
if (value == null || value.equals("")) {
propBox.setVisibility(View.GONE);
} else {
if (propBox.getVisibility() == View.GONE)
propBox.setVisibility(View.VISIBLE);
TextView propLabel = (TextView) propBox.findViewById(R.id.propLabel);
propLabel.setText(label);
TextView propValue = (TextView) propBox.findViewById(R.id.propValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
import com.viewpagerindicator.PageIndicator;
import com.viewpagerindicator.TitlePageIndicator;

import org.teleal.cling.model.types.DeviceType;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Date;
Expand Down Expand Up @@ -244,7 +246,7 @@ public void UpdateCurrentGroupModules() {
ModuleParameter widgetParam = m.getParameter("Widget.DisplayModule");
String widget = "";
if (widgetParam != null) widget = widgetParam.Value;
if (widget.equals("homegenie/generic/program")) {
if ((widget.equals("") && m.DeviceType.equals("Program")) || widget.equals("homegenie/generic/program")) {
mGroupPrograms.add(m);
} else {
controlModules.add(m);
Expand Down
Binary file modified HomeGenieAndroid/deps/homegenieclientlib-1.0.2.jar
Binary file not shown.

0 comments on commit a272352

Please sign in to comment.