Map: launch the correct map from menu

travis-ci
Georg Lukas 2020-08-29 21:02:19 +02:00
rodzic 62de815f33
commit 4a6dc267ad
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -44,7 +44,7 @@ object MapModes {
def startMap(ctx : Context, prefs : PrefsWrapper, targetcall : String) {
val mm = defaultMapMode(ctx, prefs)
val intent = new Intent(ctx, mm.viewClass)
if (targetcall != "")
if (targetcall != null && targetcall != "")
intent.setData(Uri.parse(targetcall))
else
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)

Wyświetl plik

@ -321,7 +321,7 @@ trait UIHelper extends Activity
startActivity(new Intent(this, classOf[HubActivity]).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
true
case R.id.map =>
startActivity(new Intent(this, classOf[GoogleMapAct]).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
MapModes.startMap(this, prefs, "")
true
case R.id.log =>
startActivity(new Intent(this, classOf[LogActivity]).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));