Skip to content

Commit

Permalink
Upgrade CommonUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Oct 18, 2023
1 parent 30eb44c commit 8f3d8b9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.gianlu.pretendyourexyzzy;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.gianlu.commonutils.analytics.AnalyticsApplication;
import com.gianlu.commonutils.preferences.CommonPK;
Expand All @@ -22,6 +24,12 @@ protected boolean isDebug() {
return BuildConfig.DEBUG;
}

@Nullable
@Override
protected String getGithubProjectName() {
return "PretendYoureXyzzyAndroid";
}

@Override
public void onCreate() {
super.onCreate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public interface OnPollingPyxErrorListener {
public static class NoServersException extends Exception {

public void solve(@NonNull Context context) {
OfflineActivity.startActivity(context, null);
OfflineActivity.startActivity(context, "PretendYoureXyzzyAndroid",null);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
binding.settingsApp.setSubtitle(R.string.devgianluCopyright, Calendar.getInstance().get(Calendar.YEAR));
binding.settingsVersion.setSubtitle(getVersion());
binding.settingsDeveloper.setOnClickListener((v) -> openLink("https://gianlu.xyz"));
binding.settingsEmailMe.setOnClickListener((v) -> LogsHelper.sendEmail(requireContext(), null));
binding.settingsOpenSource.setOnClickListener((v) -> openLink("https://github.com/devgianlu/PretendYoureXyzzyAndroid"));
binding.settingsTranslators.setOnClickListener((v) -> replaceFragment(Page.TRANSLATORS));

Expand All @@ -353,7 +352,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
});
binding.settingsDonate.setOnClickListener(v -> donate());

binding.settingsSendLogs.setOnClickListener(v -> LogsHelper.sendEmail(requireContext(), null));
binding.settingsOpenIssue.setOnClickListener(v -> LogsHelper.openGithubIssue(requireContext(), "PretendYoureXyzzyAndroid", null));
binding.settingsExportLogs.setOnClickListener(v -> {
Intent shareIntent = new Intent(Intent.ACTION_SEND);
Exception logsException = LogsHelper.exportLogFiles(requireContext(), shareIntent);
Expand Down
15 changes: 3 additions & 12 deletions app/src/main/res/layout/fragment_new_main_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@
app:subtitle="@string/devgianlu"
app:title="@string/prefs_developer" />

<com.gianlu.pretendyourexyzzy.PreferenceItemView
android:id="@+id/settings_emailMe"
style="@style/TextAppearance.PreferencesItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/baseline_email_24"
app:subtitle="@string/devgianluEmail"
app:title="@string/emailMe" />

<com.gianlu.pretendyourexyzzy.PreferenceItemView
android:id="@+id/settings_openSource"
style="@style/TextAppearance.PreferencesItem"
Expand Down Expand Up @@ -137,12 +128,12 @@
android:text="@string/logs" />

<com.gianlu.pretendyourexyzzy.PreferenceItemView
android:id="@+id/settings_sendLogs"
android:id="@+id/settings_openIssue"
style="@style/TextAppearance.PreferencesItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/baseline_email_24"
app:title="@string/send_email" />
app:icon="@drawable/baseline_bug_report_24"
app:title="@string/openIssue" />

<com.gianlu.pretendyourexyzzy.PreferenceItemView
android:id="@+id/settings_exportLogs"
Expand Down

0 comments on commit 8f3d8b9

Please sign in to comment.