1
0
Fork 1

Fix up + add strings

This commit is contained in:
Arne 2024-12-09 14:19:33 +01:00
parent aeac25dd54
commit c500842eff
4 changed files with 8 additions and 15 deletions

View file

@ -144,7 +144,6 @@ import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.text.SimpleDateFormat;
import java.util.AbstractMap;
@ -5835,17 +5834,6 @@ public class ConversationFragment extends XmppFragment
}
};
public boolean isEmpty(Path path) throws IOException {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Files.isDirectory(path)) {
try (Stream<Path> entries = Files.list(path)) {
return !entries.findFirst().isPresent();
}
}
}
return false;
}
private final OnClickListener mgifsButtonListener = new OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -807,8 +807,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
if (getPreferences().contains("nomedia")) return false;
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Show media in gallery");
builder.setMessage("Would you like to show received and sent media in your system gallery?");
builder.setTitle(R.string.show_media_title);
builder.setMessage(R.string.show_media_summary);
builder.setPositiveButton(R.string.yes, (dialog, which) -> {
getPreferences().edit().putBoolean("nomedia", false).apply();
});

View file

@ -40,7 +40,7 @@ public class MainSettingsFragment extends PreferenceFragmentCompat {
up.setVisible(!Strings.isNullOrEmpty(getString(R.string.default_push_server)));
findPreference("extensions").setOnPreferenceClickListener((p) -> {
getFragmentManager().beginTransaction()
.replace(R.id.fragment_container, new com.cheogram.android.ExtensionSettingsFragment())
.replace(R.id.fragment_container, new de.monocles.chat.ExtensionSettingsFragment())
.addToBackStack(null)
.commit();
return true;

View file

@ -1394,4 +1394,9 @@
<string name="open">Open</string>
<string name="pref_call_integration">Call integration</string>
<string name="pref_call_integration_summary">Calls from this app interact with regular phone calls, such as ending one call when another starts.</string>
<string name="pref_extensions_summary">Add, remove, and configure extensions</string>
<string name="pref_extensions_title">Extensions</string>
<string name="add_extension">Add extension</string>
<string name="show_media_title">Show media in gallery?</string>
<string name="show_media_summary">Would you like to show received and sent media in your system gallery?</string>
</resources>