Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/strings updates #1659

Merged
merged 37 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f241328
Fixing styling issue in unread scroll to bottom button
ThomasSession Sep 2, 2024
32acd6e
Fixing up styling of Prominent buttons and "view_user" to work better…
ThomasSession Sep 2, 2024
28d59f9
Fixing strings
ThomasSession Sep 2, 2024
ea24ff6
Strings fixes
ThomasSession Sep 3, 2024
97db1fe
Reworked preferences
ThomasSession Sep 3, 2024
2704bc7
Updated the fake message in appearance
ThomasSession Sep 3, 2024
4aa68c9
Adding the ability to copy in message details
ThomasSession Sep 3, 2024
4d47354
Showing 'copy account id' in menu in 1to1 too
ThomasSession Sep 3, 2024
ffbb7d8
Updating files tab in "All media"
ThomasSession Sep 3, 2024
2f4c605
Strings updates
ThomasSession Sep 4, 2024
81f56de
Latest strings and handling bold
ThomasSession Sep 4, 2024
86f89f8
Updated constants file
ThomasSession Sep 4, 2024
d7bd0bf
Can save media in message details page now
ThomasSession Sep 4, 2024
bc067b6
Adding padding so that context menu doesn't hit the bottom of the screen
ThomasSession Sep 4, 2024
3db8b46
Strings update
ThomasSession Sep 4, 2024
7f8e9fd
Reverted changes on DMs
ThomasSession Sep 4, 2024
14207c7
Better ripple for home FAB
ThomasSession Sep 5, 2024
2c3e73b
Added a control message when the current user accepts a message request
ThomasSession Sep 5, 2024
a7843af
Updated QR screen to show dialog when permission is permanently denied
ThomasSession Sep 5, 2024
fa90b74
Using the Compose version of our QR scanning
ThomasSession Sep 5, 2024
4fd3961
Comments for future changes in JoinCommunityFragment
ThomasSession Sep 5, 2024
139f4ba
New strings + new camera permission handling
ThomasSession Sep 5, 2024
5795998
Making sure we do not crash when making/receiving a call without the …
ThomasSession Sep 2, 2024
4860adc
Added a new control message type to handle missed calls due to permis…
ThomasSession Sep 2, 2024
f44d066
Changed the missed call control message logic
ThomasSession Sep 2, 2024
2174976
Do not change the text color on emioji picker
ThomasSession Sep 6, 2024
aef0adb
[SES-2695] Incorrect message request approval on home screen
Sep 6, 2024
c38efc2
WIP for new avatar selection
ThomasSession Sep 6, 2024
c633338
Merge branch 'feature/strings-updates' of https://github.com/oxen-io/…
ThomasSession Sep 8, 2024
c0bf015
SES-2651 - New avatar picker
ThomasSession Sep 8, 2024
422b8b2
Fixing the remaining tasks
ThomasSession Sep 9, 2024
ae64189
Differentiating between voice notes and regular audio
ThomasSession Sep 9, 2024
4e2cef6
Fixing 'Leave group dialog' from inside the group settings
ThomasSession Sep 9, 2024
1761024
SES-2692 only save valid media in message details
ThomasSession Sep 9, 2024
87e3f93
SES-2675 - Standardisingdenied mic permission
ThomasSession Sep 9, 2024
85161ff
PR comment
ThomasSession Sep 9, 2024
83b08cc
Fixing Camera permissions
ThomasSession Sep 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -457,39 +457,7 @@ public void retrieveUserProfile() {
}

private void resubmitProfilePictureIfNeeded() {
// Files expire on the file server after a while, so we simply re-upload the user's profile picture
// at a certain interval to ensure it's always available.
String userPublicKey = TextSecurePreferences.getLocalNumber(this);
if (userPublicKey == null) return;
long now = new Date().getTime();
long lastProfilePictureUpload = TextSecurePreferences.getLastProfilePictureUpload(this);
if (now - lastProfilePictureUpload <= 14 * 24 * 60 * 60 * 1000) return;
ThreadUtils.queue(() -> {
// Don't generate a new profile key here; we do that when the user changes their profile picture
Log.d("Loki-Avatar", "Uploading Avatar Started");
String encodedProfileKey = TextSecurePreferences.getProfileKey(ApplicationContext.this);
try {
// Read the file into a byte array
InputStream inputStream = AvatarHelper.getInputStreamFor(ApplicationContext.this, Address.fromSerialized(userPublicKey));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int count;
byte[] buffer = new byte[1024];
while ((count = inputStream.read(buffer, 0, buffer.length)) != -1) {
baos.write(buffer, 0, count);
}
baos.flush();
byte[] profilePicture = baos.toByteArray();
// Re-upload it
ProfilePictureUtilities.INSTANCE.upload(profilePicture, encodedProfileKey, ApplicationContext.this).success(unit -> {
// Update the last profile picture upload date
TextSecurePreferences.setLastProfilePictureUpload(ApplicationContext.this, new Date().getTime());
Log.d("Loki-Avatar", "Uploading Avatar Finished");
return Unit.INSTANCE;
});
} catch (Exception e) {
Log.e("Loki-Avatar", "Uploading avatar failed.");
}
});
ProfilePictureUtilities.INSTANCE.resubmitProfilePictureIfNeeded(this);
}

private void loadEmojiSearchIndexIfNeeded() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.thoughtcrime.securesms

import android.content.Context
import android.content.Intent
import android.net.Uri
import com.squareup.phrase.Phrase
import network.loki.messenger.R
import org.session.libsession.utilities.StringSubstitutionConstants.APP_NAME_KEY

class MissingMicrophonePermissionDialog {
companion object {
@JvmStatic
fun show(context: Context) = context.showSessionDialog {
title(R.string.permissionsMicrophone)
text(
Phrase.from(context, R.string.permissionsMicrophoneAccessRequired)
.put(APP_NAME_KEY, context.getString(R.string.app_name))
.format().toString())
button(R.string.sessionSettings, R.string.AccessibilityId_sessionSettings) {
val intent = Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
val uri = Uri.fromParts("package", context.packageName, null)
intent.setData(uri)
context.startActivity(intent)
}
cancelButton()
}
}
}
Loading