Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-09-02 13:39:05 +02:00
commit ce88f44fba
4 changed files with 15 additions and 3 deletions

View file

@ -2255,4 +2255,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="add_opening_hours">Add opening hours</string>
<string name="poi_dialog_poi_type">POI Type</string>
<string name="number_of_rows_in_dash">Number of rows in dash %1$s</string>
<string name="please_specify_poi_type">Please specify POI type.</string>
</resources>

View file

@ -389,7 +389,7 @@ public class MapActivity extends AccessibleActivity {
if (!dashboardOnMap.isVisible()) {
final OsmandSettings.CommonPreference<Boolean> shouldShowDashboardOnStart =
settings.registerBooleanPreference(MapActivity.SHOULD_SHOW_DASHBOARD_ON_START, true);
if (shouldShowDashboardOnStart.get())
if (shouldShowDashboardOnStart.get() || dashboardOnMap.hasCriticalMessages())
dashboardOnMap.setDashboardVisibility(true, DashboardOnMap.staticVisibleType);
}
}

View file

@ -910,6 +910,13 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
transaction.show(frag).commit();
}
public boolean hasCriticalMessages() {
final OsmandSettings settings = getMyApplication().getSettings();
return rateUsShouldShow.shouldShow(settings, mapActivity, DashRateUsFragment.TAG)
|| errorShouldShow.shouldShow(settings, mapActivity, DashErrorFragment.TAG);
}
View getParentView() {
return dashboardView;
}

View file

@ -19,6 +19,7 @@ import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
@ -196,7 +197,7 @@ public class EditPoiFragment extends Fragment {
((MapActivity) getActivity()).getMyApplication().getIconsCache()
.getPaintedContentIcon(R.drawable.ic_action_help,
getResources().getColor(R.color.inactive_item_orange)));
ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton);
final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton);
poiTypeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -265,7 +266,10 @@ public class EditPoiFragment extends Fragment {
saveButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO implement saving
if (TextUtils.isEmpty(poiTypeEditText.getText())) {
poiTypeEditText.setError(getResources().getString(R.string.please_specify_poi_type));
return;
}
OsmPoint.Action action = node.getId() == -1 ? OsmPoint.Action.CREATE : OsmPoint.Action.MODIFY;
String description = "";
for (Tag tag : editPoiData.tags) {