Skip to content

Commit

Permalink
restored trackid click on chart view with the new mobile API
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed Mar 17, 2022
1 parent 2d508c3 commit c5ad286
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

import butterknife.BindView;
Expand Down Expand Up @@ -349,7 +350,7 @@ private void updateMap() {

private void setTrackDescription(SensorTrack track, boolean isPublishedData){
chart_name.setText("ID:"+track.getName());
chart_name.setClickable(false); // we need fix it (heroku issue)
chart_name.setClickable(true); // we need fix it (heroku issue)
if(!isPublishedData) {
chart_name.setTextColor(getResources().getColor(R.color.black));
}
Expand All @@ -370,9 +371,10 @@ private void setTrackDescription(SensorTrack track, boolean isPublishedData){
private View.OnClickListener onChartIdClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Logger.w(TAG, "[CHART] onChartIdClick");
if(recordId!=null) UITools.viewLink(
getActivity(),
getString(R.string.url_chart_get_data)+recordId+"?output=json"
requireContext(),
getString(R.string.url_chart_get_data)+recordId
);
}
};
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
<string name="key_device_info">key_device_info</string>
<string name="key_setting_vars">key_settings_vars</string>
<string name="title_device_status">Estado bluetooth:</string>
<string name="url_chart_get_data">http://canairio.herokuapp.com/tracks/get/</string>
<string name="msg_chart_sharing">Compartiendo datos en la pestaña público…</string>
<string name="bt_dialog_cancel">Cancelar</string>
<string name="bt_dialog_agree">Estoy de acuerdo</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<string name="key_device_info">key_device_info</string>
<string name="key_setting_vars">key_settings_vars</string>
<string name="title_device_status">Bluetooth status:</string>
<string name="url_chart_get_data">http://canairio.herokuapp.com/tracks/get/</string>
<string name="url_chart_get_data" translatable="false">http://api.canair.io:8080/tracks/</string>
<string name="msg_chart_sharing">Sharing data to public tab..</string>
<string name="bt_dialog_cancel">Cancel</string>
<string name="bt_dialog_agree">I agree</string>
Expand Down

0 comments on commit c5ad286

Please sign in to comment.