mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-26 07:43:36 +00:00
[android] Update About page
also update copyright.html to refer to comaps, and fix project name hardcoding in utils.java Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
committed by
Konstantin Pastbin
parent
5b4e6f73a1
commit
906507daa2
@@ -58,16 +58,17 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
setupItem(R.id.news, true, root);
|
||||
setupItem(R.id.web, true, root);
|
||||
setupItem(R.id.email, true, root);
|
||||
setupItem(R.id.github, true, root);
|
||||
setupItem(R.id.code_repo, false, root);
|
||||
setupItem(R.id.telegram, false, root);
|
||||
setupItem(R.id.instagram, false, root);
|
||||
setupItem(R.id.facebook, false, root);
|
||||
setupItem(R.id.twitter, true, root);
|
||||
//setupItem(R.id.twitter, true, root);
|
||||
setupItem(R.id.matrix, true, root);
|
||||
setupItem(R.id.mastodon, false, root);
|
||||
setupItem(R.id.openstreetmap, true, root);
|
||||
setupItem(R.id.faq, true, root);
|
||||
setupItem(R.id.report, isLandscape, root);
|
||||
setupItem(R.id.copyright, false, root);
|
||||
|
||||
final TextView supportUsView = root.findViewById(R.id.support_us);
|
||||
if (BuildConfig.FLAVOR.equals("google") && !TextUtils.isEmpty(mDonateUrl))
|
||||
@@ -91,11 +92,10 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
else
|
||||
setupItem(R.id.rate, true, root);
|
||||
|
||||
setupItem(R.id.copyright, false, root);
|
||||
View termOfUseView = root.findViewById(R.id.term_of_use_link);
|
||||
View privacyPolicyView = root.findViewById(R.id.privacy_policy);
|
||||
termOfUseView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "terms/"));
|
||||
privacyPolicyView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "privacy/"));
|
||||
termOfUseView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "terms/"));
|
||||
privacyPolicyView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "privacy/"));
|
||||
|
||||
shareLauncher = SharingUtils.RegisterLauncher(this);
|
||||
|
||||
@@ -109,21 +109,21 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
{
|
||||
final int id = v.getId();
|
||||
if (id == R.id.web)
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url));
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url));
|
||||
else if (id == R.id.news)
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "news/");
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "news/");
|
||||
else if (id == R.id.email)
|
||||
Utils.sendTo(requireContext(), BuildConfig.SUPPORT_MAIL, "Organic Maps");
|
||||
else if (id == R.id.github)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.GITHUB);
|
||||
Utils.sendTo(requireContext(), BuildConfig.SUPPORT_MAIL, getString(R.string.project_name));
|
||||
else if (id == R.id.code_repo)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.CODE_REPO);
|
||||
else if (id == R.id.telegram)
|
||||
Utils.openUrl(requireActivity(), getString(R.string.telegram_url));
|
||||
else if (id == R.id.instagram)
|
||||
Utils.openUrl(requireActivity(), getString(R.string.instagram_url));
|
||||
else if (id == R.id.facebook)
|
||||
Utils.showFacebookPage(requireActivity());
|
||||
else if (id == R.id.twitter)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.TWITTER);
|
||||
// else if (id == R.id.twitter)
|
||||
// Utils.openUrl(requireActivity(), Constants.Url.TWITTER);
|
||||
else if (id == R.id.matrix)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.MATRIX);
|
||||
else if (id == R.id.mastodon)
|
||||
@@ -135,7 +135,7 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
else if (id == R.id.report)
|
||||
Utils.sendBugReport(shareLauncher, requireActivity(), "", "");
|
||||
else if (id == R.id.support_us)
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "support-us/");
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "support-us/");
|
||||
else if (id == R.id.donate)
|
||||
Utils.openUrl(requireActivity(), mDonateUrl);
|
||||
else if (id == R.id.rate)
|
||||
|
||||
@@ -343,7 +343,7 @@ public final class Config
|
||||
// Enable donations by default if not Google or Huawei. Replace organicmaps.app/donate/ with localized page.
|
||||
if ((url.isEmpty() && !BuildConfig.FLAVOR.equals("google") && !BuildConfig.FLAVOR.equals("huawei")) ||
|
||||
url.endsWith("organicmaps.app/donate/"))
|
||||
return context.getString(R.string.translated_om_site_url) + "donate/";
|
||||
return context.getString(R.string.app_site_url) + "donate/";
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ public final class Constants
|
||||
public static final String MAIL_SUBJECT = "?subject=";
|
||||
public static final String MAIL_BODY = "&body=";
|
||||
|
||||
public static final String FB_OM_COMMUNITY_HTTP = "https://www.facebook.com/OrganicMaps";
|
||||
public static final String FB_OM_COMMUNITY_NATIVE = "fb://profile/102378968471811";
|
||||
public static final String TWITTER = "https://twitter.com/OrganicMapsApp";
|
||||
public static final String MATRIX = "https://matrix.to/#/%23organicmaps:matrix.org";
|
||||
public static final String MASTODON = "https://fosstodon.org/@organicmaps";
|
||||
public static final String MATRIX = "https://matrix.to/#/%23comaps:matrix.org";
|
||||
public static final String MASTODON = "https://fosstodon.org/@comaps";
|
||||
public static final String FB_OM_COMMUNITY_HTTP = "https://www.facebook.com/profile.php?id=61575286559965";
|
||||
public static final String FB_OM_COMMUNITY_NATIVE = "fb://profile/61575286559965";
|
||||
//public static final String TWITTER = "https://twitter.com/user";
|
||||
|
||||
public static final String GITHUB = "https://github.com/organicmaps/organicmaps";
|
||||
public static final String CODE_REPO = "https://codeberg.org/comaps/comaps";
|
||||
|
||||
public static final String COPYRIGHT = "file:///android_asset/copyright.html";
|
||||
public static final String FAQ = "file:///android_asset/faq.html";
|
||||
|
||||
@@ -177,7 +177,7 @@ public class Utils
|
||||
{
|
||||
final android.content.ClipboardManager clipboard =
|
||||
(android.content.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
final ClipData clip = ClipData.newPlainText("Organic Maps: " + text, text);
|
||||
final ClipData clip = ClipData.newPlainText(context.getString(R.string.project_name) + ": " + text, text);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
}
|
||||
|
||||
@@ -318,14 +318,14 @@ public class Utils
|
||||
*/
|
||||
public static void sendBugReport(@NonNull ActivityResultLauncher<SharingUtils.SharingIntent> launcher, @NonNull Activity activity, @NonNull String subject, @NonNull String body)
|
||||
{
|
||||
subject = "Organic Maps Bugreport" + (TextUtils.isEmpty(subject) ? "" : ": " + subject);
|
||||
subject = activity.getString(R.string.project_name) + " Bug Report" + (TextUtils.isEmpty(subject) ? "" : ": " + subject);
|
||||
LogsManager.INSTANCE.zipLogs(new SupportInfoWithLogsCallback(launcher, activity, subject, body, Constants.Email.SUPPORT));
|
||||
}
|
||||
|
||||
// TODO: Don't send logs with general feedback, send system information only (version, device name, connectivity, etc.)
|
||||
public static void sendFeedback(@NonNull ActivityResultLauncher<SharingUtils.SharingIntent> launcher, @NonNull Activity activity)
|
||||
{
|
||||
LogsManager.INSTANCE.zipLogs(new SupportInfoWithLogsCallback(launcher, activity, "Organic Maps Feedback", "",
|
||||
LogsManager.INSTANCE.zipLogs(new SupportInfoWithLogsCallback(launcher, activity, activity.getString(R.string.project_name) + " Feedback", "",
|
||||
Constants.Email.SUPPORT));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user