mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 11:27:49 +00:00
Merge branch 'dev' into nicknames
This commit is contained in:
@@ -143,8 +143,8 @@ dependencies {
|
||||
testImplementation 'org.robolectric:shadows-multidex:4.2'
|
||||
}
|
||||
|
||||
def canonicalVersionCode = 166
|
||||
def canonicalVersionName = "1.10.6"
|
||||
def canonicalVersionCode = 170
|
||||
def canonicalVersionName = "1.10.7"
|
||||
|
||||
def postFixSize = 10
|
||||
def abiPostFix = ['armeabi-v7a' : 1,
|
||||
|
@@ -22,21 +22,17 @@ import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.DefaultLifecycleObserver;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import org.conscrypt.Conscrypt;
|
||||
import org.session.libsession.avatars.AvatarHelper;
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration;
|
||||
import org.session.libsession.messaging.file_server.FileServerAPI;
|
||||
import org.session.libsession.messaging.mentions.MentionsManager;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI;
|
||||
import org.session.libsession.messaging.sending_receiving.notifications.MessageNotifier;
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.ClosedGroupPoller;
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.ClosedGroupPollerV2;
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.Poller;
|
||||
import org.session.libsession.snode.SnodeModule;
|
||||
import org.session.libsession.utilities.Address;
|
||||
@@ -131,7 +127,6 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
// Loki
|
||||
public MessageNotifier messageNotifier = null;
|
||||
public Poller poller = null;
|
||||
public ClosedGroupPoller closedGroupPoller = null;
|
||||
public Broadcaster broadcaster = null;
|
||||
public SignalCommunicationModule communicationModule;
|
||||
private Job firebaseInstanceIdJob;
|
||||
@@ -175,9 +170,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
if (userPublicKey != null) {
|
||||
MentionsManager.Companion.configureIfNeeded(userPublicKey, userDB);
|
||||
}
|
||||
setUpStorageAPIIfNeeded();
|
||||
resubmitProfilePictureIfNeeded();
|
||||
updateOpenGroupProfilePicturesIfNeeded();
|
||||
if (userPublicKey != null) {
|
||||
registerForFCMIfNeeded(false);
|
||||
}
|
||||
@@ -206,10 +199,8 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
poller.setCaughtUp(false);
|
||||
}
|
||||
startPollingIfNeeded();
|
||||
// FIXME: Open group handling
|
||||
/*
|
||||
publicChatManager.markAllAsNotCaughtUp();
|
||||
*/
|
||||
|
||||
OpenGroupManager.INSTANCE.setAllCaughtUp(false);
|
||||
OpenGroupManager.INSTANCE.startPolling();
|
||||
}
|
||||
|
||||
@@ -223,9 +214,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
if (poller != null) {
|
||||
poller.stopIfNeeded();
|
||||
}
|
||||
if (closedGroupPoller != null) {
|
||||
closedGroupPoller.stopIfNeeded();
|
||||
}
|
||||
ClosedGroupPollerV2.getShared().stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -406,20 +395,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
super.attachBaseContext(DynamicLanguageContextWrapper.updateContext(base, TextSecurePreferences.getLanguage(base)));
|
||||
}
|
||||
|
||||
private static class ProviderInitializationException extends RuntimeException {
|
||||
}
|
||||
|
||||
// region Loki
|
||||
public boolean setUpStorageAPIIfNeeded() {
|
||||
String userPublicKey = TextSecurePreferences.getLocalNumber(this);
|
||||
if (userPublicKey == null || !IdentityKeyUtil.hasIdentityKey(this)) {
|
||||
return false;
|
||||
}
|
||||
byte[] userPrivateKey = IdentityKeyUtil.getIdentityKeyPair(this).getPrivateKey().serialize();
|
||||
LokiAPIDatabaseProtocol apiDB = DatabaseFactory.getLokiAPIDatabase(this);
|
||||
FileServerAPI.Companion.configure(userPublicKey, userPrivateKey, apiDB);
|
||||
return true;
|
||||
}
|
||||
private static class ProviderInitializationException extends RuntimeException { }
|
||||
|
||||
public void registerForFCMIfNeeded(final Boolean force) {
|
||||
if (firebaseInstanceIdJob != null && firebaseInstanceIdJob.isActive() && !force) return;
|
||||
@@ -451,7 +427,6 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
return;
|
||||
}
|
||||
poller = new Poller();
|
||||
closedGroupPoller = new ClosedGroupPoller();
|
||||
}
|
||||
|
||||
public void startPollingIfNeeded() {
|
||||
@@ -459,9 +434,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
if (poller != null) {
|
||||
poller.startIfNeeded();
|
||||
}
|
||||
if (closedGroupPoller != null) {
|
||||
closedGroupPoller.startIfNeeded();
|
||||
}
|
||||
ClosedGroupPollerV2.getShared().start();
|
||||
}
|
||||
|
||||
private void resubmitProfilePictureIfNeeded() {
|
||||
@@ -498,19 +471,6 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
});
|
||||
}
|
||||
|
||||
public void updateOpenGroupProfilePicturesIfNeeded() {
|
||||
AsyncTask.execute(() -> {
|
||||
byte[] profileKey = ProfileKeyUtil.getProfileKey(this);
|
||||
String url = TextSecurePreferences.getProfilePictureURL(this);
|
||||
Set<String> servers = DatabaseFactory.getLokiThreadDatabase(this).getAllPublicChatServers();
|
||||
for (String server : servers) {
|
||||
if (profileKey != null) {
|
||||
OpenGroupAPI.setProfilePicture(server, profileKey, url);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void clearAllData(boolean isMigratingToV2KeyPair) {
|
||||
String token = TextSecurePreferences.getFCMToken(this);
|
||||
if (token != null && !token.isEmpty()) {
|
||||
|
@@ -30,18 +30,15 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.loader.app.LoaderManager.LoaderCallbacks;
|
||||
import androidx.loader.content.Loader;
|
||||
|
||||
|
||||
import org.session.libsession.messaging.messages.visible.LinkPreview;
|
||||
import org.session.libsession.messaging.messages.visible.OpenGroupInvitation;
|
||||
import org.session.libsession.messaging.messages.visible.Quote;
|
||||
import org.session.libsession.messaging.messages.visible.VisibleMessage;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2;
|
||||
import org.session.libsession.messaging.sending_receiving.MessageSender;
|
||||
import org.session.libsession.messaging.utilities.UpdateMessageData;
|
||||
import org.thoughtcrime.securesms.MessageDetailsRecipientAdapter.RecipientDeliveryStatus;
|
||||
@@ -264,7 +261,7 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
|
||||
}
|
||||
toFrom.setText(toFromRes);
|
||||
long threadID = messageRecord.getThreadId();
|
||||
OpenGroup openGroup = DatabaseFactory.getLokiThreadDatabase(this).getPublicChat(threadID);
|
||||
OpenGroupV2 openGroup = DatabaseFactory.getLokiThreadDatabase(this).getOpenGroupChat(threadID);
|
||||
if (openGroup != null && messageRecord.isOutgoing()) {
|
||||
toFrom.setVisibility(View.GONE);
|
||||
separator.setVisibility(View.GONE);
|
||||
|
@@ -5,10 +5,9 @@ import android.text.TextUtils
|
||||
import com.google.protobuf.ByteString
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.session.libsession.database.MessageDataProvider
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.*
|
||||
import org.session.libsession.utilities.Address
|
||||
import org.session.libsession.messaging.utilities.DotNetAPI
|
||||
import org.session.libsession.utilities.UploadResult
|
||||
import org.session.libsession.utilities.Util
|
||||
import org.session.libsignal.utilities.guava.Optional
|
||||
import org.session.libsignal.messages.SignalServiceAttachment
|
||||
@@ -104,11 +103,7 @@ class DatabaseAttachmentProvider(context: Context, helper: SQLCipherOpenHelper)
|
||||
return smsDatabase.isOutgoingMessage(timestamp) || mmsDatabase.isOutgoingMessage(timestamp)
|
||||
}
|
||||
|
||||
override fun getOpenGroup(threadID: Long): OpenGroup? {
|
||||
return null // TODO: Implement
|
||||
}
|
||||
|
||||
override fun handleSuccessfulAttachmentUpload(attachmentId: Long, attachmentStream: SignalServiceAttachmentStream, attachmentKey: ByteArray, uploadResult: DotNetAPI.UploadResult) {
|
||||
override fun handleSuccessfulAttachmentUpload(attachmentId: Long, attachmentStream: SignalServiceAttachmentStream, attachmentKey: ByteArray, uploadResult: UploadResult) {
|
||||
val database = DatabaseFactory.getAttachmentDatabase(context)
|
||||
val databaseAttachment = getDatabaseAttachment(attachmentId) ?: return
|
||||
val attachmentPointer = SignalServiceAttachmentPointer(uploadResult.id,
|
||||
|
@@ -13,24 +13,18 @@ import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup;
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.Attachment;
|
||||
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities;
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||
import org.thoughtcrime.securesms.mms.Slide;
|
||||
import org.thoughtcrime.securesms.mms.SlideDeck;
|
||||
|
||||
import org.session.libsession.utilities.recipients.Recipient;
|
||||
import org.session.libsession.utilities.recipients.RecipientModifiedListener;
|
||||
import org.session.libsession.utilities.TextSecurePreferences;
|
||||
@@ -197,15 +191,11 @@ public class QuoteView extends FrameLayout implements RecipientModifiedListener
|
||||
boolean outgoing = messageType != MESSAGE_TYPE_INCOMING;
|
||||
boolean isOwnNumber = Util.isOwnNumber(getContext(), author.getAddress().serialize());
|
||||
|
||||
String quoteeDisplayName = author.toShortString();
|
||||
String quoteeDisplayName;
|
||||
|
||||
long threadID = DatabaseFactory.getThreadDatabase(getContext()).getOrCreateThreadIdFor(conversationRecipient);
|
||||
String senderHexEncodedPublicKey = author.getAddress().serialize();
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getPublicChat(threadID);
|
||||
if (senderHexEncodedPublicKey.equalsIgnoreCase(TextSecurePreferences.getLocalNumber(getContext()))) {
|
||||
quoteeDisplayName = TextSecurePreferences.getProfileName(getContext());
|
||||
} else if (publicChat != null) {
|
||||
quoteeDisplayName = DatabaseFactory.getLokiUserDatabase(getContext()).getServerDisplayName(publicChat.getId(), senderHexEncodedPublicKey);
|
||||
} else {
|
||||
quoteeDisplayName = DatabaseFactory.getLokiUserDatabase(getContext()).getDisplayName(senderHexEncodedPublicKey);
|
||||
}
|
||||
|
@@ -77,9 +77,7 @@ import androidx.core.view.MenuItemCompat;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import androidx.loader.app.LoaderManager;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@@ -90,7 +88,6 @@ import org.session.libsession.messaging.messages.signal.OutgoingSecureMediaMessa
|
||||
import org.session.libsession.messaging.messages.signal.OutgoingTextMessage;
|
||||
import org.session.libsession.messaging.messages.visible.OpenGroupInvitation;
|
||||
import org.session.libsession.messaging.messages.visible.VisibleMessage;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2;
|
||||
import org.session.libsession.messaging.sending_receiving.MessageSender;
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.Attachment;
|
||||
@@ -194,7 +191,6 @@ import org.thoughtcrime.securesms.util.BitmapUtil;
|
||||
import org.thoughtcrime.securesms.util.DateUtils;
|
||||
import org.thoughtcrime.securesms.util.MediaUtil;
|
||||
import org.thoughtcrime.securesms.util.PushCharacterCalculator;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -205,7 +201,6 @@ import java.util.Locale;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import kotlin.Unit;
|
||||
import network.loki.messenger.R;
|
||||
|
||||
@@ -378,12 +373,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
MentionManagerUtilities.INSTANCE.populateUserPublicKeyCacheIfNeeded(threadId, this);
|
||||
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(this).getPublicChat(threadId);
|
||||
OpenGroupV2 openGroupV2 = DatabaseFactory.getLokiThreadDatabase(this).getOpenGroupChat(threadId);
|
||||
if (publicChat != null) {
|
||||
// Request open group info update and handle the successful result in #onOpenGroupInfoUpdated().
|
||||
PublicChatInfoUpdateWorker.scheduleInstant(this, publicChat.getServer(), publicChat.getChannel());
|
||||
} else if (openGroupV2 != null) {
|
||||
if (openGroupV2 != null) {
|
||||
PublicChatInfoUpdateWorker.scheduleInstant(this, openGroupV2.getServer(), openGroupV2.getRoom());
|
||||
if (openGroupV2.getRoom().equals("session") || openGroupV2.getRoom().equals("oxen")
|
||||
|| openGroupV2.getRoom().equals("lokinet") || openGroupV2.getRoom().equals("crypto")) {
|
||||
@@ -1414,13 +1405,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onOpenGroupInfoUpdated(OpenGroupUtilities.GroupInfoUpdatedEvent event) {
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(this).getPublicChat(threadId);
|
||||
OpenGroupV2 openGroup = DatabaseFactory.getLokiThreadDatabase(this).getOpenGroupChat(threadId);
|
||||
if (publicChat != null &&
|
||||
publicChat.getChannel() == event.getChannel() &&
|
||||
publicChat.getServer().equals(event.getUrl())) {
|
||||
this.updateSubtitleTextView();
|
||||
}
|
||||
if (openGroup != null &&
|
||||
openGroup.getRoom().equals(event.getRoom()) &&
|
||||
openGroup.getServer().equals(event.getUrl())) {
|
||||
@@ -2376,13 +2361,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
muteIndicatorImageView.setVisibility(View.VISIBLE);
|
||||
subtitleTextView.setText("Muted until " + DateUtils.getFormattedDateTime(recipient.mutedUntil, "EEE, MMM d, yyyy HH:mm", Locale.getDefault()));
|
||||
} else if (recipient.isGroupRecipient() && recipient.getName() != null && !recipient.getName().equals("Session Updates") && !recipient.getName().equals("Loki News")) {
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(this).getPublicChat(threadId);
|
||||
OpenGroupV2 openGroup = DatabaseFactory.getLokiThreadDatabase(this).getOpenGroupChat(threadId);
|
||||
if (publicChat != null) {
|
||||
Integer userCount = DatabaseFactory.getLokiAPIDatabase(this).getUserCount(publicChat.getChannel(), publicChat.getServer());
|
||||
if (userCount == null) { userCount = 0; }
|
||||
subtitleTextView.setText(userCount + " members");
|
||||
} else if (openGroup != null) {
|
||||
if (openGroup != null) {
|
||||
Integer userCount = DatabaseFactory.getLokiAPIDatabase(this).getUserCount(openGroup.getRoom(),openGroup.getServer());
|
||||
if (userCount == null) { userCount = 0; }
|
||||
subtitleTextView.setText(userCount + " members");
|
||||
|
@@ -54,17 +54,13 @@ import androidx.loader.content.Loader;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView.OnScrollListener;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration;
|
||||
import org.session.libsession.messaging.messages.control.DataExtractionNotification;
|
||||
import org.session.libsession.messaging.messages.signal.OutgoingMediaMessage;
|
||||
import org.session.libsession.messaging.messages.signal.OutgoingTextMessage;
|
||||
import org.session.libsession.messaging.messages.visible.Quote;
|
||||
import org.session.libsession.messaging.messages.visible.VisibleMessage;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPIV2;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2;
|
||||
import org.session.libsession.messaging.sending_receiving.MessageSender;
|
||||
@@ -398,9 +394,8 @@ public class ConversationFragment extends Fragment
|
||||
boolean isGroupChat = recipient.isGroupRecipient();
|
||||
|
||||
if (isGroupChat) {
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getPublicChat(threadId);
|
||||
OpenGroupV2 openGroupChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getOpenGroupChat(threadId);
|
||||
boolean isPublicChat = (publicChat != null || openGroupChat != null);
|
||||
boolean isPublicChat = (openGroupChat != null);
|
||||
int selectedMessageCount = messageRecords.size();
|
||||
boolean areAllSentByUser = true;
|
||||
Set<String> uniqueUserSet = new HashSet<>();
|
||||
@@ -412,10 +407,7 @@ public class ConversationFragment extends Fragment
|
||||
menu.findItem(R.id.menu_context_reply).setVisible(selectedMessageCount == 1);
|
||||
String userHexEncodedPublicKey = TextSecurePreferences.getLocalNumber(requireContext());
|
||||
boolean userCanModerate =
|
||||
(isPublicChat &&
|
||||
((publicChat != null && OpenGroupAPI.isUserModerator(userHexEncodedPublicKey, publicChat.getChannel(), publicChat.getServer()))
|
||||
|| (openGroupChat != null && OpenGroupAPIV2.isUserModerator(userHexEncodedPublicKey, openGroupChat.getRoom(), openGroupChat.getServer())))
|
||||
);
|
||||
(isPublicChat && (OpenGroupAPIV2.isUserModerator(userHexEncodedPublicKey, openGroupChat.getRoom(), openGroupChat.getServer())));
|
||||
boolean isDeleteOptionVisible = !isPublicChat || (areAllSentByUser || userCanModerate);
|
||||
// allow banning if moderating a public chat and only one user's messages are selected
|
||||
boolean isBanOptionVisible = isPublicChat && userCanModerate && !areAllSentByUser && uniqueUserSet.size() == 1;
|
||||
@@ -515,7 +507,6 @@ public class ConversationFragment extends Fragment
|
||||
builder.setMessage(getActivity().getResources().getQuantityString(R.plurals.ConversationFragment_this_will_permanently_delete_all_n_selected_messages, messagesCount, messagesCount));
|
||||
builder.setCancelable(true);
|
||||
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getPublicChat(threadId);
|
||||
OpenGroupV2 openGroupChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getOpenGroupChat(threadId);
|
||||
|
||||
builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {
|
||||
@@ -527,7 +518,7 @@ public class ConversationFragment extends Fragment
|
||||
{
|
||||
@Override
|
||||
protected Void doInBackground(MessageRecord... messageRecords) {
|
||||
if (publicChat != null || openGroupChat != null) {
|
||||
if (openGroupChat != null) {
|
||||
ArrayList<Long> serverIDs = new ArrayList<>();
|
||||
ArrayList<Long> ignoredMessages = new ArrayList<>();
|
||||
ArrayList<Long> failedMessages = new ArrayList<>();
|
||||
@@ -541,29 +532,7 @@ public class ConversationFragment extends Fragment
|
||||
ignoredMessages.add(messageRecord.getId());
|
||||
}
|
||||
}
|
||||
if (publicChat != null) {
|
||||
OpenGroupAPI
|
||||
.deleteMessages(serverIDs, publicChat.getChannel(), publicChat.getServer(), isSentByUser)
|
||||
.success(l -> {
|
||||
for (MessageRecord messageRecord : messageRecords) {
|
||||
Long serverID = DatabaseFactory.getLokiMessageDatabase(getContext()).getServerID(messageRecord.id, !messageRecord.isMms());
|
||||
if (l.contains(serverID)) {
|
||||
if (messageRecord.isMms()) {
|
||||
DatabaseFactory.getMmsDatabase(getActivity()).delete(messageRecord.getId());
|
||||
} else {
|
||||
DatabaseFactory.getSmsDatabase(getActivity()).deleteMessage(messageRecord.getId());
|
||||
}
|
||||
} else if (!ignoredMessages.contains(serverID)) {
|
||||
failedMessages.add(messageRecord.getId());
|
||||
Log.w("Loki", "Failed to delete message: " + messageRecord.getId() + ".");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}). fail(e -> {
|
||||
Log.w("Loki", "Couldn't delete message due to error: " + e.toString() + ".");
|
||||
return null;
|
||||
});
|
||||
} else if (openGroupChat != null) {
|
||||
if (openGroupChat != null) {
|
||||
for (Long serverId : serverIDs) {
|
||||
OpenGroupAPIV2
|
||||
.deleteMessage(serverId, openGroupChat.getRoom(), openGroupChat.getServer())
|
||||
@@ -617,7 +586,6 @@ public class ConversationFragment extends Fragment
|
||||
builder.setTitle(R.string.ConversationFragment_ban_selected_user);
|
||||
builder.setCancelable(true);
|
||||
|
||||
final OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getPublicChat(threadId);
|
||||
final OpenGroupV2 openGroupChat = DatabaseFactory.getLokiThreadDatabase(getContext()).getOpenGroupChat(threadId);
|
||||
|
||||
builder.setPositiveButton(R.string.ban, (dialog, which) -> {
|
||||
@@ -630,17 +598,7 @@ public class ConversationFragment extends Fragment
|
||||
@Override
|
||||
protected Void doInBackground(String... userPublicKeyParam) {
|
||||
String userPublicKey = userPublicKeyParam[0];
|
||||
if (publicChat != null) {
|
||||
OpenGroupAPI
|
||||
.ban(userPublicKey, publicChat.getServer())
|
||||
.success(l -> {
|
||||
Log.d("Loki", "User banned");
|
||||
return Unit.INSTANCE;
|
||||
}).fail(e -> {
|
||||
Log.e("Loki", "Couldn't ban user due to error",e);
|
||||
return null;
|
||||
});
|
||||
} else if (openGroupChat != null) {
|
||||
if (openGroupChat != null) {
|
||||
OpenGroupAPIV2
|
||||
.ban(userPublicKey, openGroupChat.getRoom(), openGroupChat.getServer())
|
||||
.success(l -> {
|
||||
|
@@ -45,17 +45,12 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.DimenRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.session.libsession.messaging.jobs.AttachmentDownloadJob;
|
||||
import org.session.libsession.messaging.jobs.JobQueue;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPIV2;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2;
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.AttachmentTransferProgress;
|
||||
@@ -760,10 +755,6 @@ public class ConversationItem extends LinearLayout
|
||||
String publicKey = recipient.getAddress().toString();
|
||||
profilePictureView.setPublicKey(publicKey);
|
||||
String displayName = recipient.getName();
|
||||
OpenGroup openGroup = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID);
|
||||
if (displayName == null && openGroup != null) {
|
||||
displayName = DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(openGroup.getId(), publicKey);
|
||||
}
|
||||
profilePictureView.setDisplayName(displayName);
|
||||
profilePictureView.setAdditionalPublicKey(null);
|
||||
profilePictureView.setRSSFeed(false);
|
||||
@@ -898,20 +889,7 @@ public class ConversationItem extends LinearLayout
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void setGroupMessageStatus(MessageRecord messageRecord, Recipient recipient) {
|
||||
if (groupThread && !messageRecord.isOutgoing()) {
|
||||
// Show custom display names for group chats
|
||||
String displayName = recipient.toShortString();
|
||||
try {
|
||||
String serverId = GroupUtil.getDecodedGroupID(conversationRecipient.getAddress().serialize());
|
||||
String senderDisplayName = DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(serverId, recipient.getAddress().serialize());
|
||||
if (senderDisplayName != null) {
|
||||
displayName = senderDisplayName;
|
||||
} else {
|
||||
// opengroupv2 format
|
||||
displayName = OpenGroupUtilities.getDisplayName(recipient);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
this.groupSender.setText(displayName);
|
||||
|
||||
@@ -952,12 +930,8 @@ public class ConversationItem extends LinearLayout
|
||||
profilePictureView.setVisibility(VISIBLE);
|
||||
int visibility = View.GONE;
|
||||
|
||||
OpenGroup publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(messageRecord.getThreadId());
|
||||
OpenGroupV2 openGroupV2 = DatabaseFactory.getLokiThreadDatabase(context).getOpenGroupChat(messageRecord.getThreadId());
|
||||
if (publicChat != null) {
|
||||
boolean isModerator = OpenGroupAPI.isUserModerator(current.getRecipient().getAddress().toString(), publicChat.getChannel(), publicChat.getServer());
|
||||
visibility = isModerator ? View.VISIBLE : View.GONE;
|
||||
} else if (openGroupV2 != null) {
|
||||
if (openGroupV2 != null) {
|
||||
boolean isModerator = OpenGroupAPIV2.isUserModerator(current.getRecipient().getAddress().toString(), openGroupV2.getRoom(), openGroupV2.getServer());
|
||||
visibility = isModerator ? View.VISIBLE : View.GONE;
|
||||
}
|
||||
|
@@ -2,7 +2,6 @@ package org.thoughtcrime.securesms.database
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import okhttp3.HttpUrl
|
||||
import org.session.libsession.database.StorageProtocol
|
||||
import org.session.libsession.messaging.contacts.Contact
|
||||
import org.session.libsession.messaging.jobs.AttachmentUploadJob
|
||||
@@ -14,7 +13,6 @@ import org.session.libsession.messaging.messages.signal.*
|
||||
import org.session.libsession.messaging.messages.signal.IncomingTextMessage
|
||||
import org.session.libsession.messaging.messages.visible.Attachment
|
||||
import org.session.libsession.messaging.messages.visible.VisibleMessage
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment
|
||||
@@ -41,12 +39,12 @@ import org.thoughtcrime.securesms.jobs.RetrieveProfileAvatarJob
|
||||
import org.thoughtcrime.securesms.loki.api.OpenGroupManager
|
||||
import org.thoughtcrime.securesms.loki.database.LokiThreadDatabase
|
||||
import org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol
|
||||
import org.thoughtcrime.securesms.loki.utilities.OpenGroupUtilities
|
||||
import org.thoughtcrime.securesms.loki.utilities.get
|
||||
import org.thoughtcrime.securesms.loki.utilities.getString
|
||||
import org.thoughtcrime.securesms.mms.PartAuthority
|
||||
|
||||
class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), StorageProtocol {
|
||||
|
||||
override fun getUserPublicKey(): String? {
|
||||
return TextSecurePreferences.getLocalNumber(context)
|
||||
}
|
||||
@@ -73,13 +71,13 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return TextSecurePreferences.getProfilePictureURL(context)
|
||||
}
|
||||
|
||||
override fun setUserProfilePictureUrl(newProfilePicture: String) {
|
||||
override fun setUserProfilePictureURL(newValue: String) {
|
||||
val ourRecipient = Address.fromSerialized(getUserPublicKey()!!).let {
|
||||
Recipient.from(context, it, false)
|
||||
}
|
||||
TextSecurePreferences.setProfilePictureURL(context, newProfilePicture)
|
||||
RetrieveProfileAvatarJob(ourRecipient, newProfilePicture)
|
||||
ApplicationContext.getInstance(context).jobManager.add(RetrieveProfileAvatarJob(ourRecipient, newProfilePicture))
|
||||
TextSecurePreferences.setProfilePictureURL(context, newValue)
|
||||
RetrieveProfileAvatarJob(ourRecipient, newValue)
|
||||
ApplicationContext.getInstance(context).jobManager.add(RetrieveProfileAvatarJob(ourRecipient, newValue))
|
||||
}
|
||||
|
||||
override fun getOrGenerateRegistrationID(): Int {
|
||||
@@ -91,15 +89,15 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return registrationID
|
||||
}
|
||||
|
||||
override fun persistAttachments(messageId: Long, attachments: List<Attachment>): List<Long> {
|
||||
override fun persistAttachments(messageID: Long, attachments: List<Attachment>): List<Long> {
|
||||
val database = DatabaseFactory.getAttachmentDatabase(context)
|
||||
val databaseAttachments = attachments.mapNotNull { it.toSignalAttachment() }
|
||||
return database.insertAttachments(messageId, databaseAttachments)
|
||||
return database.insertAttachments(messageID, databaseAttachments)
|
||||
}
|
||||
|
||||
override fun getAttachmentsForMessage(messageId: Long): List<DatabaseAttachment> {
|
||||
override fun getAttachmentsForMessage(messageID: Long): List<DatabaseAttachment> {
|
||||
val database = DatabaseFactory.getAttachmentDatabase(context)
|
||||
return database.getAttachmentsForMessage(messageId)
|
||||
return database.getAttachmentsForMessage(messageID)
|
||||
}
|
||||
|
||||
override fun persist(message: VisibleMessage, quotes: QuoteModel?, linkPreview: List<LinkPreview?>, groupPublicKey: String?, openGroupID: String?, attachments: List<Attachment>): Long? {
|
||||
@@ -169,7 +167,6 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return messageID
|
||||
}
|
||||
|
||||
// JOBS
|
||||
override fun persistJob(job: Job) {
|
||||
DatabaseFactory.getSessionJobDatabase(context).persistJob(job)
|
||||
}
|
||||
@@ -203,20 +200,6 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return DatabaseFactory.getSessionJobDatabase(context).isJobCanceled(job)
|
||||
}
|
||||
|
||||
// Authorization
|
||||
|
||||
override fun getAuthToken(server: String): String? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getAuthToken(server)
|
||||
}
|
||||
|
||||
override fun setAuthToken(server: String, newValue: String?) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setAuthToken(server, newValue)
|
||||
}
|
||||
|
||||
override fun removeAuthToken(server: String) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setAuthToken(server, null)
|
||||
}
|
||||
|
||||
override fun getAuthToken(room: String, server: String): String? {
|
||||
val id = "$server.$room"
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getAuthToken(id)
|
||||
@@ -232,30 +215,15 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setAuthToken(id, null)
|
||||
}
|
||||
|
||||
override fun getOpenGroup(threadID: String): OpenGroup? {
|
||||
if (threadID.toInt() < 0) { return null }
|
||||
val database = databaseHelper.readableDatabase
|
||||
return database.get(LokiThreadDatabase.publicChatTable, "${LokiThreadDatabase.threadID} = ?", arrayOf(threadID)) { cursor ->
|
||||
val publicChatAsJSON = cursor.getString(LokiThreadDatabase.publicChat)
|
||||
OpenGroup.fromJSON(publicChatAsJSON)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getV2OpenGroup(threadId: String): OpenGroupV2? {
|
||||
override fun getV2OpenGroup(threadId: Long): OpenGroupV2? {
|
||||
if (threadId.toInt() < 0) { return null }
|
||||
val database = databaseHelper.readableDatabase
|
||||
return database.get(LokiThreadDatabase.publicChatTable, "${LokiThreadDatabase.threadID} = ?", arrayOf(threadId)) { cursor ->
|
||||
return database.get(LokiThreadDatabase.publicChatTable, "${LokiThreadDatabase.threadID} = ?", arrayOf( threadId.toString() )) { cursor ->
|
||||
val publicChatAsJson = cursor.getString(LokiThreadDatabase.publicChat)
|
||||
OpenGroupV2.fromJSON(publicChatAsJson)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getThreadID(openGroupID: String): String {
|
||||
val address = Address.fromSerialized(openGroupID)
|
||||
val recipient = Recipient.from(context, address, false)
|
||||
return DatabaseFactory.getThreadDatabase(context).getOrCreateThreadIdFor(recipient).toString()
|
||||
}
|
||||
|
||||
override fun getOpenGroupPublicKey(server: String): String? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getOpenGroupPublicKey(server)
|
||||
}
|
||||
@@ -264,59 +232,27 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setOpenGroupPublicKey(server, newValue)
|
||||
}
|
||||
|
||||
override fun setOpenGroupDisplayName(publicKey: String, channel: Long, server: String, displayName: String) {
|
||||
val groupID = "$server.$channel"
|
||||
DatabaseFactory.getLokiUserDatabase(context).setServerDisplayName(groupID, publicKey, displayName)
|
||||
}
|
||||
|
||||
override fun setOpenGroupDisplayName(publicKey: String, room: String, server: String, displayName: String) {
|
||||
val groupID = "$server.$room"
|
||||
DatabaseFactory.getLokiUserDatabase(context).setServerDisplayName(groupID, publicKey, displayName)
|
||||
}
|
||||
|
||||
override fun getOpenGroupDisplayName(publicKey: String, channel: Long, server: String): String? {
|
||||
val groupID = "$server.$channel"
|
||||
return DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(groupID, publicKey)
|
||||
}
|
||||
|
||||
override fun getOpenGroupDisplayName(publicKey: String, room: String, server: String): String? {
|
||||
val groupID = "$server.$room"
|
||||
return DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(groupID, publicKey)
|
||||
}
|
||||
|
||||
override fun getLastMessageServerId(room: String, server: String): Long? {
|
||||
override fun getLastMessageServerID(room: String, server: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getLastMessageServerID(room, server)
|
||||
}
|
||||
|
||||
override fun setLastMessageServerId(room: String, server: String, newValue: Long) {
|
||||
override fun setLastMessageServerID(room: String, server: String, newValue: Long) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setLastMessageServerID(room, server, newValue)
|
||||
}
|
||||
|
||||
override fun removeLastMessageServerId(room: String, server: String) {
|
||||
override fun removeLastMessageServerID(room: String, server: String) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).removeLastMessageServerID(room, server)
|
||||
}
|
||||
|
||||
override fun getLastMessageServerID(group: Long, server: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getLastMessageServerID(group, server)
|
||||
}
|
||||
|
||||
override fun setLastMessageServerID(group: Long, server: String, newValue: Long) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setLastMessageServerID(group, server, newValue)
|
||||
}
|
||||
|
||||
override fun removeLastMessageServerID(group: Long, server: String) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).removeLastMessageServerID(group, server)
|
||||
}
|
||||
|
||||
override fun getLastDeletionServerId(room: String, server: String): Long? {
|
||||
override fun getLastDeletionServerID(room: String, server: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getLastDeletionServerID(room, server)
|
||||
}
|
||||
|
||||
override fun setLastDeletionServerId(room: String, server: String, newValue: Long) {
|
||||
override fun setLastDeletionServerID(room: String, server: String, newValue: Long) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setLastDeletionServerID(room, server, newValue)
|
||||
}
|
||||
|
||||
override fun removeLastDeletionServerId(room: String, server: String) {
|
||||
override fun removeLastDeletionServerID(room: String, server: String) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).removeLastDeletionServerID(room, server)
|
||||
}
|
||||
|
||||
@@ -324,34 +260,15 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setUserCount(room, server, newValue)
|
||||
}
|
||||
|
||||
override fun getLastDeletionServerID(group: Long, server: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getLastDeletionServerID(group, server)
|
||||
}
|
||||
|
||||
override fun setLastDeletionServerID(group: Long, server: String, newValue: Long) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setLastDeletionServerID(group, server, newValue)
|
||||
}
|
||||
|
||||
override fun removeLastDeletionServerID(group: Long, server: String) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).removeLastDeletionServerID(group, server)
|
||||
override fun setOpenGroupServerMessageID(messageID: Long, serverID: Long, threadID: Long, isSms: Boolean) {
|
||||
DatabaseFactory.getLokiMessageDatabase(context).setServerID(messageID, serverID, isSms)
|
||||
DatabaseFactory.getLokiMessageDatabase(context).setOriginalThreadID(messageID, serverID, threadID)
|
||||
}
|
||||
|
||||
override fun isDuplicateMessage(timestamp: Long): Boolean {
|
||||
return getReceivedMessageTimestamps().contains(timestamp)
|
||||
}
|
||||
|
||||
override fun setUserCount(group: Long, server: String, newValue: Int) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setUserCount(group, server, newValue)
|
||||
}
|
||||
|
||||
override fun setOpenGroupProfilePictureURL(group: Long, server: String, newValue: String) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setOpenGroupProfilePictureURL(group, server, newValue)
|
||||
}
|
||||
|
||||
override fun getOpenGroupProfilePictureURL(group: Long, server: String): String? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getOpenGroupProfilePictureURL(group, server)
|
||||
}
|
||||
|
||||
override fun updateTitle(groupID: String, newValue: String) {
|
||||
DatabaseFactory.getGroupDatabase(context).updateTitle(groupID, newValue)
|
||||
}
|
||||
@@ -378,15 +295,6 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return database.getMessageFor(timestamp, address)?.getId()
|
||||
}
|
||||
|
||||
override fun setOpenGroupServerMessageID(messageID: Long, serverID: Long, threadID: Long, isSms: Boolean) {
|
||||
DatabaseFactory.getLokiMessageDatabase(context).setServerID(messageID, serverID, isSms)
|
||||
DatabaseFactory.getLokiMessageDatabase(context).setOriginalThreadID(messageID, serverID, threadID)
|
||||
}
|
||||
|
||||
override fun getQuoteServerID(quoteID: Long, publicKey: String): Long? {
|
||||
return DatabaseFactory.getLokiMessageDatabase(context).getQuoteServerID(quoteID, publicKey)
|
||||
}
|
||||
|
||||
override fun markAsSent(timestamp: Long, author: String) {
|
||||
val database = DatabaseFactory.getMmsSmsDatabase(context)
|
||||
val messageRecord = database.getMessageFor(timestamp, author) ?: return
|
||||
@@ -445,7 +353,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getGroupDatabase(context).setActive(groupID, value)
|
||||
}
|
||||
|
||||
override fun getZombieMember(groupID: String): Set<String> {
|
||||
override fun getZombieMembers(groupID: String): Set<String> {
|
||||
return DatabaseFactory.getGroupDatabase(context).getGroupZombieMembers(groupID).map { it.address.serialize() }.toHashSet()
|
||||
}
|
||||
|
||||
@@ -457,7 +365,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getGroupDatabase(context).updateMembers(groupID, members)
|
||||
}
|
||||
|
||||
override fun updateZombieMembers(groupID: String, members: List<Address>) {
|
||||
override fun setZombieMembers(groupID: String, members: List<Address>) {
|
||||
DatabaseFactory.getGroupDatabase(context).updateZombieMembers(groupID, members)
|
||||
}
|
||||
|
||||
@@ -523,39 +431,18 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getLokiAPIDatabase(context).removeAllClosedGroupEncryptionKeyPairs(groupPublicKey)
|
||||
}
|
||||
|
||||
override fun getAllOpenGroups(): Map<Long, OpenGroup> {
|
||||
return DatabaseFactory.getLokiThreadDatabase(context).getAllPublicChats().mapValues { (_,chat)->
|
||||
OpenGroup(chat.channel, chat.server, chat.displayName, chat.isDeletable)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getAllV2OpenGroups(): Map<Long, OpenGroupV2> {
|
||||
return DatabaseFactory.getLokiThreadDatabase(context).getAllV2OpenGroups()
|
||||
}
|
||||
|
||||
override fun addOpenGroup(serverUrl: String, channel: Long) {
|
||||
val httpUrl = HttpUrl.parse(serverUrl) ?: return
|
||||
if (httpUrl.queryParameterNames().contains("public_key")) {
|
||||
// open group v2
|
||||
val server = HttpUrl.Builder().scheme(httpUrl.scheme()).host(httpUrl.host()).apply {
|
||||
if (httpUrl.port() != 80 || httpUrl.port() != 443) {
|
||||
// non-standard port, add to server
|
||||
this.port(httpUrl.port())
|
||||
}
|
||||
}.build()
|
||||
val room = httpUrl.pathSegments().firstOrNull() ?: return
|
||||
val publicKey = httpUrl.queryParameter("public_key") ?: return
|
||||
|
||||
OpenGroupManager.add(server.toString().removeSuffix("/"), room, publicKey, context)
|
||||
} else {
|
||||
// TODO: No longer supported so let's remove this code
|
||||
}
|
||||
}
|
||||
|
||||
override fun getAllGroups(): List<GroupRecord> {
|
||||
return DatabaseFactory.getGroupDatabase(context).allGroups
|
||||
}
|
||||
|
||||
override fun addOpenGroup(urlAsString: String) {
|
||||
OpenGroupManager.addOpenGroup(urlAsString, context)
|
||||
}
|
||||
|
||||
override fun setProfileSharing(address: Address, value: Boolean) {
|
||||
val recipient = Recipient.from(context, address, false)
|
||||
DatabaseFactory.getRecipientDatabase(context).setProfileSharing(recipient, value)
|
||||
@@ -580,8 +467,17 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
}
|
||||
}
|
||||
|
||||
override fun getThreadIdFor(address: Address): Long? {
|
||||
override fun getThreadId(publicKeyOrOpenGroupID: String): Long? {
|
||||
val address = Address.fromSerialized(publicKeyOrOpenGroupID)
|
||||
return getThreadId(address)
|
||||
}
|
||||
|
||||
override fun getThreadId(address: Address): Long? {
|
||||
val recipient = Recipient.from(context, address, false)
|
||||
return getThreadId(recipient)
|
||||
}
|
||||
|
||||
override fun getThreadId(recipient: Recipient): Long? {
|
||||
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdIfExistsFor(recipient)
|
||||
return if (threadID < 0) null else threadID
|
||||
}
|
||||
@@ -595,22 +491,6 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return threadId
|
||||
}
|
||||
|
||||
override fun getSessionRequestSentTimestamp(publicKey: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getSessionRequestSentTimestamp(publicKey)
|
||||
}
|
||||
|
||||
override fun setSessionRequestSentTimestamp(publicKey: String, newValue: Long) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setSessionRequestSentTimestamp(publicKey, newValue)
|
||||
}
|
||||
|
||||
override fun getSessionRequestProcessedTimestamp(publicKey: String): Long? {
|
||||
return DatabaseFactory.getLokiAPIDatabase(context).getSessionRequestProcessedTimestamp(publicKey)
|
||||
}
|
||||
|
||||
override fun setSessionRequestProcessedTimestamp(publicKey: String, newValue: Long) {
|
||||
DatabaseFactory.getLokiAPIDatabase(context).setSessionRequestProcessedTimestamp(publicKey, newValue)
|
||||
}
|
||||
|
||||
override fun getDisplayName(publicKey: String): String? {
|
||||
val contact = DatabaseFactory.getSessionContactDatabase(context).getContactWithSessionID(publicKey)
|
||||
contact?.let {
|
||||
@@ -662,10 +542,15 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
threadDatabase.getOrCreateThreadIdFor(recipient)
|
||||
}
|
||||
if (contacts.isNotEmpty()) {
|
||||
threadDatabase.notifyUpdatedFromConfig()
|
||||
threadDatabase.notifyConversationListListeners()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLastUpdated(threadID: Long): Long {
|
||||
val threadDB = DatabaseFactory.getThreadDatabase(context)
|
||||
return threadDB.getLastUpdated(threadID)
|
||||
}
|
||||
|
||||
override fun getAttachmentDataUri(attachmentId: AttachmentId): Uri {
|
||||
return PartAuthority.getAttachmentDataUri(attachmentId)
|
||||
}
|
||||
@@ -674,7 +559,6 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return PartAuthority.getAttachmentThumbnailUri(attachmentId)
|
||||
}
|
||||
|
||||
// Data Extraction Notification
|
||||
override fun insertDataExtractionNotificationMessage(senderPublicKey: String, message: DataExtractionNotificationInfoMessage, sentTimestamp: Long) {
|
||||
val database = DatabaseFactory.getMmsDatabase(context)
|
||||
val address = fromSerialized(senderPublicKey)
|
||||
|
@@ -64,7 +64,7 @@ public class ThreadDatabase extends Database {
|
||||
|
||||
private static final String TAG = ThreadDatabase.class.getSimpleName();
|
||||
|
||||
private Map<Long, Address> addressCache = new HashMap<>();
|
||||
private final Map<Long, Address> addressCache = new HashMap<>();
|
||||
|
||||
public static final String TABLE_NAME = "thread";
|
||||
public static final String ID = "_id";
|
||||
@@ -404,6 +404,21 @@ public class ThreadDatabase extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
public Long getLastUpdated(long threadId) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = db.query(TABLE_NAME, new String[]{DATE}, ID_WHERE, new String[]{String.valueOf(threadId)}, null, null, null);
|
||||
|
||||
try {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
return cursor.getLong(0);
|
||||
}
|
||||
|
||||
return -1L;
|
||||
} finally {
|
||||
if (cursor != null) cursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteConversation(long threadId) {
|
||||
DatabaseFactory.getSmsDatabase(context).deleteThread(threadId);
|
||||
DatabaseFactory.getMmsDatabase(context).deleteThread(threadId);
|
||||
@@ -471,7 +486,6 @@ public class ThreadDatabase extends Database {
|
||||
}
|
||||
|
||||
public @Nullable Recipient getRecipientForThreadId(long threadId) {
|
||||
// Loki - Cache the address
|
||||
if (addressCache.containsKey(threadId) && addressCache.get(threadId) != null) {
|
||||
return Recipient.from(context, addressCache.get(threadId), false);
|
||||
}
|
||||
@@ -505,17 +519,13 @@ public class ThreadDatabase extends Database {
|
||||
notifyConversationListeners(threadId);
|
||||
}
|
||||
|
||||
public void notifyUpdatedFromConfig() {
|
||||
notifyConversationListListeners();
|
||||
}
|
||||
|
||||
public boolean update(long threadId, boolean unarchive) {
|
||||
MmsSmsDatabase mmsSmsDatabase = DatabaseFactory.getMmsSmsDatabase(context);
|
||||
long count = mmsSmsDatabase.getConversationCount(threadId);
|
||||
|
||||
boolean shouldDeleteEmptyThread = deleteThreadOnEmpty(threadId);
|
||||
|
||||
|
||||
if (count == 0) {
|
||||
if (count == 0 && shouldDeleteEmptyThread) {
|
||||
deleteThread(threadId);
|
||||
notifyConversationListListeners();
|
||||
return true;
|
||||
@@ -534,9 +544,12 @@ public class ThreadDatabase extends Database {
|
||||
notifyConversationListListeners();
|
||||
return false;
|
||||
} else {
|
||||
deleteThread(threadId);
|
||||
notifyConversationListListeners();
|
||||
return true;
|
||||
if (shouldDeleteEmptyThread) {
|
||||
deleteThread(threadId);
|
||||
notifyConversationListListeners();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} finally {
|
||||
if (reader != null)
|
||||
@@ -544,6 +557,11 @@ public class ThreadDatabase extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean deleteThreadOnEmpty(long threadId) {
|
||||
Recipient threadRecipient = getRecipientForThreadId(threadId);
|
||||
return threadRecipient != null && !threadRecipient.isOpenGroupRecipient();
|
||||
}
|
||||
|
||||
private @NonNull String getFormattedBodyFor(@NonNull MessageRecord messageRecord) {
|
||||
if (messageRecord.isMms()) {
|
||||
MmsMessageRecord record = (MmsMessageRecord) messageRecord;
|
||||
|
@@ -58,9 +58,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
private static final int lokiV23 = 44;
|
||||
private static final int lokiV24 = 45;
|
||||
private static final int lokiV25 = 46;
|
||||
private static final int lokiV26 = 47;
|
||||
|
||||
// Loki - onUpgrade(...) must be updated to use Loki version numbers if Signal makes any database changes
|
||||
private static final int DATABASE_VERSION = lokiV25;
|
||||
private static final int DATABASE_VERSION = lokiV26;
|
||||
private static final String DATABASE_NAME = "signal.db";
|
||||
|
||||
private final Context context;
|
||||
@@ -295,6 +296,12 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
if (oldVersion < lokiV25) {
|
||||
String jobTable = SessionJobDatabase.sessionJobTable;
|
||||
db.execSQL("DROP TABLE " + jobTable);
|
||||
db.execSQL(SessionJobDatabase.getCreateSessionJobTableCommand());
|
||||
}
|
||||
|
||||
if (oldVersion < lokiV26) {
|
||||
db.execSQL(SessionContactDatabase.getCreateSessionContactTableCommand());
|
||||
}
|
||||
|
||||
|
@@ -70,10 +70,6 @@ public class GroupManager {
|
||||
final ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(context);
|
||||
final Recipient groupRecipient = Recipient.from(context, Address.fromSerialized(groupId), false);
|
||||
|
||||
if (!groupDatabase.getGroup(groupId).isPresent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
long threadId = threadDatabase.getThreadIdIfExistsFor(groupRecipient);
|
||||
if (threadId != -1L) {
|
||||
threadDatabase.deleteConversation(threadId);
|
||||
|
@@ -92,7 +92,7 @@ public class AvatarDownloadJob extends BaseJob implements InjectableType {
|
||||
SignalServiceAttachmentPointer pointer = new SignalServiceAttachmentPointer(avatarId, contentType, key, Optional.of(0), Optional.absent(), 0, 0, digest, fileName, false, Optional.absent(), url);
|
||||
|
||||
if (pointer.getUrl().isEmpty()) throw new InvalidMessageException("Missing attachment URL.");
|
||||
DownloadUtilities.downloadFile(attachment, pointer.getUrl(), MAX_AVATAR_SIZE, null);
|
||||
DownloadUtilities.downloadFile(attachment, pointer.getUrl());
|
||||
|
||||
// Assume we're retrieving an attachment for an open group server if the digest is not set
|
||||
InputStream inputStream;
|
||||
|
@@ -100,7 +100,7 @@ public class RetrieveProfileAvatarJob extends BaseJob implements InjectableType
|
||||
File downloadDestination = File.createTempFile("avatar", ".jpg", context.getCacheDir());
|
||||
|
||||
try {
|
||||
DownloadUtilities.downloadFile(downloadDestination, profileAvatar, MAX_PROFILE_SIZE_BYTES, null);
|
||||
DownloadUtilities.downloadFile(downloadDestination, profileAvatar);
|
||||
InputStream avatarStream = new ProfileCipherInputStream(new FileInputStream(downloadDestination), profileKey);
|
||||
File decryptDestination = File.createTempFile("avatar", ".jpg", context.getCacheDir());
|
||||
|
||||
|
@@ -28,7 +28,6 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import network.loki.messenger.R
|
||||
import network.loki.messenger.databinding.ActivityBackupRestoreBinding
|
||||
import org.thoughtcrime.securesms.ApplicationContext
|
||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||
import org.thoughtcrime.securesms.backup.FullBackupImporter
|
||||
@@ -61,31 +60,31 @@ class BackupRestoreActivity : BaseActionBarActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
setUpActionBarSessionLogo()
|
||||
|
||||
val viewBinding = DataBindingUtil.setContentView<ActivityBackupRestoreBinding>(this, R.layout.activity_backup_restore)
|
||||
viewBinding.lifecycleOwner = this
|
||||
viewBinding.viewModel = viewModel
|
||||
// val viewBinding = DataBindingUtil.setContentView<ActivityBackupRestoreBinding>(this, R.layout.activity_backup_restore)
|
||||
// viewBinding.lifecycleOwner = this
|
||||
// viewBinding.viewModel = viewModel
|
||||
|
||||
viewBinding.restoreButton.setOnClickListener { viewModel.tryRestoreBackup() }
|
||||
// viewBinding.restoreButton.setOnClickListener { viewModel.tryRestoreBackup() }
|
||||
|
||||
viewBinding.buttonSelectFile.setOnClickListener {
|
||||
fileSelectionResultLauncher.launch(Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
|
||||
//FIXME On some old APIs (tested on 21 & 23) the mime type doesn't filter properly
|
||||
// and the backup files are unavailable for selection.
|
||||
// type = BackupUtil.BACKUP_FILE_MIME_TYPE
|
||||
type = "*/*"
|
||||
})
|
||||
}
|
||||
// viewBinding.buttonSelectFile.setOnClickListener {
|
||||
// fileSelectionResultLauncher.launch(Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
|
||||
// //FIXME On some old APIs (tested on 21 & 23) the mime type doesn't filter properly
|
||||
// // and the backup files are unavailable for selection.
|
||||
//// type = BackupUtil.BACKUP_FILE_MIME_TYPE
|
||||
// type = "*/*"
|
||||
// })
|
||||
// }
|
||||
|
||||
viewBinding.backupCode.addTextChangedListener { text -> viewModel.backupPassphrase.value = text.toString() }
|
||||
// viewBinding.backupCode.addTextChangedListener { text -> viewModel.backupPassphrase.value = text.toString() }
|
||||
|
||||
// Focus passphrase text edit when backup file is selected.
|
||||
viewModel.backupFile.observe(this, { backupFile ->
|
||||
if (backupFile != null) viewBinding.backupCode.post {
|
||||
viewBinding.backupCode.requestFocus()
|
||||
(getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager)
|
||||
.showSoftInput(viewBinding.backupCode, InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
})
|
||||
// viewModel.backupFile.observe(this, { backupFile ->
|
||||
// if (backupFile != null) viewBinding.backupCode.post {
|
||||
// viewBinding.backupCode.requestFocus()
|
||||
// (getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager)
|
||||
// .showSoftInput(viewBinding.backupCode, InputMethodManager.SHOW_IMPLICIT)
|
||||
// }
|
||||
// })
|
||||
|
||||
// React to backup import result.
|
||||
viewModel.backupImportResult.observe(this) { result ->
|
||||
@@ -116,8 +115,8 @@ class BackupRestoreActivity : BaseActionBarActivity() {
|
||||
openURL("https://getsession.org/privacy-policy/")
|
||||
}
|
||||
}, 61, 75, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
viewBinding.termsTextView.movementMethod = LinkMovementMethod.getInstance()
|
||||
viewBinding.termsTextView.text = termsExplanation
|
||||
// viewBinding.termsTextView.movementMethod = LinkMovementMethod.getInstance()
|
||||
// viewBinding.termsTextView.text = termsExplanation
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -190,7 +189,6 @@ class BackupRestoreViewModel(application: Application): AndroidViewModel(applica
|
||||
TextSecurePreferences.setHasViewedSeed(context, true)
|
||||
TextSecurePreferences.setHasSeenWelcomeScreen(context, true)
|
||||
val application = ApplicationContext.getInstance(context)
|
||||
application.setUpStorageAPIIfNeeded()
|
||||
|
||||
BackupRestoreResult.SUCCESS
|
||||
} catch (e: DatabaseDowngradeException) {
|
||||
|
@@ -30,7 +30,6 @@ import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import org.session.libsession.messaging.jobs.JobQueue
|
||||
import org.session.libsession.messaging.mentions.MentionsManager
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI
|
||||
import org.session.libsession.messaging.sending_receiving.MessageSender
|
||||
import org.session.libsession.utilities.*
|
||||
import org.session.libsignal.utilities.toHexString
|
||||
@@ -332,16 +331,8 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
|
||||
}
|
||||
}
|
||||
// Delete the conversation
|
||||
val v1OpenGroup = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
||||
val v2OpenGroup = DatabaseFactory.getLokiThreadDatabase(context).getOpenGroupChat(threadID)
|
||||
if (v1OpenGroup != null) {
|
||||
val apiDB = DatabaseFactory.getLokiAPIDatabase(context)
|
||||
apiDB.removeLastMessageServerID(v1OpenGroup.channel, v1OpenGroup.server)
|
||||
apiDB.removeLastDeletionServerID(v1OpenGroup.channel, v1OpenGroup.server)
|
||||
apiDB.clearOpenGroupProfilePictureURL(v1OpenGroup.channel, v1OpenGroup.server)
|
||||
OpenGroupAPI.leave(v1OpenGroup.channel, v1OpenGroup.server)
|
||||
// FIXME: No longer supported so let's remove this code
|
||||
} else if (v2OpenGroup != null) {
|
||||
if (v2OpenGroup != null) {
|
||||
val apiDB = DatabaseFactory.getLokiAPIDatabase(context)
|
||||
apiDB.removeLastMessageServerID(v2OpenGroup.room, v2OpenGroup.server)
|
||||
apiDB.removeLastDeletionServerID(v2OpenGroup.room, v2OpenGroup.server)
|
||||
@@ -400,4 +391,4 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
|
||||
show(intent)
|
||||
}
|
||||
// endregion
|
||||
}
|
||||
}
|
||||
|
@@ -122,7 +122,6 @@ class LinkDeviceActivity : BaseActionBarActivity(), ScanQRCodeWrapperFragmentDel
|
||||
}
|
||||
// start polling and wait for updated message
|
||||
ApplicationContext.getInstance(this@LinkDeviceActivity).apply {
|
||||
setUpStorageAPIIfNeeded()
|
||||
startPollingIfNeeded()
|
||||
}
|
||||
TextSecurePreferences.events.filter { it == TextSecurePreferences.CONFIGURATION_SYNCED }.collect {
|
||||
|
@@ -153,7 +153,6 @@ class PNModeActivity : BaseActionBarActivity() {
|
||||
}
|
||||
TextSecurePreferences.setIsUsingFCM(this, (selectedOptionView == fcmOptionView))
|
||||
val application = ApplicationContext.getInstance(this)
|
||||
application.setUpStorageAPIIfNeeded()
|
||||
application.startPollingIfNeeded()
|
||||
application.registerForFCMIfNeeded(true)
|
||||
val intent = Intent(this, HomeActivity::class.java)
|
||||
|
@@ -26,7 +26,6 @@ import nl.komponents.kovenant.all
|
||||
import nl.komponents.kovenant.ui.alwaysUi
|
||||
import nl.komponents.kovenant.ui.successUi
|
||||
import org.session.libsession.avatars.AvatarHelper
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI
|
||||
import org.session.libsession.utilities.Address
|
||||
import org.session.libsession.utilities.ProfilePictureUtilities
|
||||
import org.session.libsession.utilities.SSKEnvironment.ProfileManagerProtocol
|
||||
@@ -179,8 +178,6 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
val promises = mutableListOf<Promise<*, Exception>>()
|
||||
val displayName = displayNameToBeUploaded
|
||||
if (displayName != null) {
|
||||
val servers = DatabaseFactory.getLokiThreadDatabase(this).getAllPublicChatServers()
|
||||
promises.addAll(servers.map { OpenGroupAPI.setDisplayName(displayName, it) })
|
||||
TextSecurePreferences.setProfileName(this, displayName)
|
||||
}
|
||||
val profilePicture = profilePictureToBeUploaded
|
||||
@@ -195,7 +192,6 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
TextSecurePreferences.setProfileAvatarId(this, SecureRandom().nextInt())
|
||||
TextSecurePreferences.setLastProfilePictureUpload(this, Date().time)
|
||||
ProfileKeyUtil.setEncodedProfileKey(this, encodedProfileKey)
|
||||
ApplicationContext.getInstance(this).updateOpenGroupProfilePicturesIfNeeded()
|
||||
}
|
||||
if (profilePicture != null || displayName != null) {
|
||||
MultiDeviceProtocol.forceSyncConfigurationNowIfNeeded(this@SettingsActivity)
|
||||
|
@@ -7,9 +7,9 @@ import androidx.work.*
|
||||
import nl.komponents.kovenant.Promise
|
||||
import nl.komponents.kovenant.all
|
||||
import nl.komponents.kovenant.functional.map
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration
|
||||
import org.session.libsession.messaging.jobs.MessageReceiveJob
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.ClosedGroupPoller
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.ClosedGroupPollerV2
|
||||
import org.session.libsession.messaging.sending_receiving.pollers.OpenGroupPollerV2
|
||||
import org.session.libsession.snode.SnodeAPI
|
||||
import org.session.libsession.utilities.TextSecurePreferences
|
||||
@@ -57,7 +57,10 @@ class BackgroundPollWorker(val context: Context, params: WorkerParameters) : Wor
|
||||
promises.addAll(dmsPromise.get())
|
||||
|
||||
// Closed groups
|
||||
promises.addAll(ClosedGroupPoller().pollOnce())
|
||||
val closedGroupPoller = ClosedGroupPollerV2() // Intentionally don't use shared
|
||||
val storage = MessagingModuleConfiguration.shared.storage
|
||||
val allGroupPublicKeys = storage.getAllClosedGroupPublicKeys()
|
||||
allGroupPublicKeys.forEach { closedGroupPoller.poll(it) }
|
||||
|
||||
// Open Groups
|
||||
val threadDB = DatabaseFactory.getLokiThreadDatabase(context)
|
||||
|
@@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.loki.api
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import androidx.annotation.WorkerThread
|
||||
import okhttp3.HttpUrl
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPIV2
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2
|
||||
@@ -19,6 +20,8 @@ object OpenGroupManager {
|
||||
private var pollers = mutableMapOf<String, OpenGroupPollerV2>() // One for each server
|
||||
private var isPolling = false
|
||||
|
||||
var isAllCaughtUp = false
|
||||
|
||||
fun startPolling() {
|
||||
if (isPolling) { return }
|
||||
isPolling = true
|
||||
@@ -47,8 +50,8 @@ object OpenGroupManager {
|
||||
val existingOpenGroup = threadDB.getOpenGroupChat(threadID)
|
||||
if (existingOpenGroup != null) { return }
|
||||
// Clear any existing data if needed
|
||||
storage.removeLastDeletionServerId(room, server)
|
||||
storage.removeLastMessageServerId(room, server)
|
||||
storage.removeLastDeletionServerID(room, server)
|
||||
storage.removeLastMessageServerID(room, server)
|
||||
// Store the public key
|
||||
storage.setOpenGroupPublicKey(server,publicKey)
|
||||
// Get an auth token
|
||||
@@ -93,9 +96,22 @@ object OpenGroupManager {
|
||||
}
|
||||
// Delete
|
||||
ThreadUtils.queue {
|
||||
storage.removeLastDeletionServerId(room, server)
|
||||
storage.removeLastMessageServerId(room, server)
|
||||
storage.removeLastDeletionServerID(room, server)
|
||||
storage.removeLastMessageServerID(room, server)
|
||||
GroupManager.deleteGroup(groupID, context) // Must be invoked on a background thread
|
||||
}
|
||||
}
|
||||
|
||||
fun addOpenGroup(urlAsString: String, context: Context) {
|
||||
val url = HttpUrl.parse(urlAsString) ?: return
|
||||
val builder = HttpUrl.Builder().scheme(url.scheme()).host(url.host())
|
||||
if (url.port() != 80 || url.port() != 443) {
|
||||
// Non-standard port; add to server
|
||||
builder.port(url.port())
|
||||
}
|
||||
val server = builder.build()
|
||||
val room = url.pathSegments().firstOrNull() ?: return
|
||||
val publicKey = url.queryParameter("public_key") ?: return
|
||||
add(server.toString().removeSuffix("/"), room, publicKey, context)
|
||||
}
|
||||
}
|
@@ -2,7 +2,6 @@ package org.thoughtcrime.securesms.loki.api
|
||||
|
||||
import android.content.Context
|
||||
import androidx.work.*
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup
|
||||
import org.session.libsignal.utilities.Log
|
||||
import org.thoughtcrime.securesms.loki.utilities.OpenGroupUtilities
|
||||
|
||||
@@ -57,36 +56,16 @@ class PublicChatInfoUpdateWorker(val context: Context, params: WorkerParameters)
|
||||
|
||||
override fun doWork(): Result {
|
||||
val serverUrl = inputData.getString(DATA_KEY_SERVER_URL)!!
|
||||
val channel = inputData.getLong(DATA_KEY_CHANNEL, -1)
|
||||
val room = inputData.getString(DATA_KEY_ROOM)
|
||||
|
||||
val isOpenGroupV2 = !room.isNullOrEmpty() && channel == -1L
|
||||
|
||||
if (!isOpenGroupV2) {
|
||||
val publicChatId = OpenGroup.getId(channel, serverUrl)
|
||||
|
||||
return try {
|
||||
Log.v(TAG, "Updating open group info for $publicChatId.")
|
||||
OpenGroupUtilities.updateGroupInfo(context, serverUrl, channel)
|
||||
Log.v(TAG, "Open group info was successfully updated for $publicChatId.")
|
||||
Result.success()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to update open group info for $publicChatId", e)
|
||||
Result.failure()
|
||||
}
|
||||
} else {
|
||||
val openGroupId = "$serverUrl.$room"
|
||||
|
||||
return try {
|
||||
Log.v(TAG, "Updating open group info for $openGroupId.")
|
||||
OpenGroupUtilities.updateGroupInfo(context, serverUrl, room!!)
|
||||
Log.v(TAG, "Open group info was successfully updated for $openGroupId.")
|
||||
Result.success()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to update open group info for $openGroupId", e)
|
||||
Result.failure()
|
||||
}
|
||||
|
||||
val openGroupId = "$serverUrl.$room"
|
||||
return try {
|
||||
Log.v(TAG, "Updating open group info for $openGroupId.")
|
||||
OpenGroupUtilities.updateGroupInfo(context, serverUrl, room!!)
|
||||
Log.v(TAG, "Open group info was successfully updated for $openGroupId.")
|
||||
Result.success()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to update open group info for $openGroupId", e)
|
||||
Result.failure()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,17 +3,13 @@ package org.thoughtcrime.securesms.loki.database
|
||||
import android.content.ContentValues
|
||||
import android.content.Context
|
||||
import android.database.Cursor
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup
|
||||
|
||||
import org.thoughtcrime.securesms.database.Database
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper
|
||||
import org.thoughtcrime.securesms.loki.utilities.*
|
||||
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2
|
||||
import org.session.libsession.utilities.Address
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
|
||||
import org.session.libsignal.utilities.JsonUtil
|
||||
|
||||
class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper) {
|
||||
@@ -22,7 +18,6 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
private val sessionResetTable = "loki_thread_session_reset_database"
|
||||
val publicChatTable = "loki_public_chat_database"
|
||||
val threadID = "thread_id"
|
||||
private val friendRequestStatus = "friend_request_status"
|
||||
private val sessionResetStatus = "session_reset_status"
|
||||
val publicChat = "public_chat"
|
||||
@JvmStatic
|
||||
@@ -37,28 +32,6 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
return DatabaseFactory.getThreadDatabase(context).getOrCreateThreadIdFor(recipient)
|
||||
}
|
||||
|
||||
fun getAllPublicChats(): Map<Long, OpenGroup> {
|
||||
val database = databaseHelper.readableDatabase
|
||||
var cursor: Cursor? = null
|
||||
val result = mutableMapOf<Long, OpenGroup>()
|
||||
try {
|
||||
cursor = database.rawQuery("select * from $publicChatTable", null)
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
val threadID = cursor.getLong(threadID)
|
||||
val string = cursor.getString(publicChat)
|
||||
val publicChat = OpenGroup.fromJSON(string)
|
||||
if (publicChat != null) {
|
||||
result[threadID] = publicChat
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
// Do nothing
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
fun getAllV2OpenGroups(): Map<Long, OpenGroupV2> {
|
||||
val database = databaseHelper.readableDatabase
|
||||
var cursor: Cursor? = null
|
||||
@@ -79,20 +52,6 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
return result
|
||||
}
|
||||
|
||||
fun getAllPublicChatServers(): Set<String> {
|
||||
return getAllPublicChats().values.fold(setOf()) { set, chat -> set.plus(chat.server) }
|
||||
}
|
||||
|
||||
fun getPublicChat(threadID: Long): OpenGroup? {
|
||||
if (threadID < 0) { return null }
|
||||
|
||||
val database = databaseHelper.readableDatabase
|
||||
return database.get(publicChatTable, "${Companion.threadID} = ?", arrayOf(threadID.toString())) { cursor ->
|
||||
val publicChatAsJSON = cursor.getString(publicChat)
|
||||
OpenGroup.fromJSON(publicChatAsJSON)
|
||||
}
|
||||
}
|
||||
|
||||
fun getOpenGroupChat(threadID: Long): OpenGroupV2? {
|
||||
if (threadID < 0) {
|
||||
return null
|
||||
@@ -114,19 +73,4 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
contentValues.put(publicChat, JsonUtil.toJson(openGroupV2.toJson()))
|
||||
database.insertOrUpdate(publicChatTable, contentValues, "${Companion.threadID} = ?", arrayOf(threadID.toString()))
|
||||
}
|
||||
|
||||
fun setPublicChat(publicChat: OpenGroup, threadID: Long) {
|
||||
if (threadID < 0) {
|
||||
return
|
||||
}
|
||||
val database = databaseHelper.writableDatabase
|
||||
val contentValues = ContentValues(2)
|
||||
contentValues.put(Companion.threadID, threadID)
|
||||
contentValues.put(Companion.publicChat, JsonUtil.toJson(publicChat.toJSON()))
|
||||
database.insertOrUpdate(publicChatTable, contentValues, "${Companion.threadID} = ?", arrayOf(threadID.toString()))
|
||||
}
|
||||
|
||||
fun removePublicChat(threadID: Long) {
|
||||
databaseHelper.writableDatabase.delete(publicChatTable, "${Companion.threadID} = ?", arrayOf(threadID.toString()))
|
||||
}
|
||||
}
|
@@ -54,27 +54,6 @@ class LokiUserDatabase(context: Context, helper: SQLCipherOpenHelper) : Database
|
||||
Recipient.from(context, Address.fromSerialized(publicKey), false).notifyListeners()
|
||||
}
|
||||
|
||||
override fun getServerDisplayName(serverID: String, publicKey: String): String? {
|
||||
val database = databaseHelper.readableDatabase
|
||||
return database.get(serverDisplayNameTable, "${Companion.publicKey} = ? AND ${Companion.serverID} = ?", arrayOf( publicKey, serverID )) { cursor ->
|
||||
cursor.getString(cursor.getColumnIndexOrThrow(displayName))
|
||||
}
|
||||
}
|
||||
|
||||
fun setServerDisplayName(serverID: String, publicKey: String, displayName: String) {
|
||||
val database = databaseHelper.writableDatabase
|
||||
val values = ContentValues(3)
|
||||
values.put(Companion.serverID, serverID)
|
||||
values.put(Companion.publicKey, publicKey)
|
||||
values.put(Companion.displayName, displayName)
|
||||
try {
|
||||
database.insertWithOnConflict(serverDisplayNameTable, null, values, SQLiteDatabase.CONFLICT_REPLACE)
|
||||
Recipient.from(context, Address.fromSerialized(publicKey), false).notifyListeners()
|
||||
} catch (e: Exception) {
|
||||
Log.d("Loki", "Couldn't save server display name due to exception: $e.")
|
||||
}
|
||||
}
|
||||
|
||||
override fun getProfilePictureURL(publicKey: String): String? {
|
||||
return if (publicKey == TextSecurePreferences.getLocalNumber(context)) {
|
||||
TextSecurePreferences.getProfilePictureURL(context)
|
||||
|
@@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.loki.utilities.*
|
||||
class SessionJobDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper) {
|
||||
|
||||
companion object {
|
||||
private const val sessionJobTable = "session_job_database"
|
||||
const val sessionJobTable = "session_job_database"
|
||||
const val jobID = "job_id"
|
||||
const val jobType = "job_type"
|
||||
const val failureCount = "failure_count"
|
||||
|
@@ -39,12 +39,6 @@ object SessionMetaProtocol {
|
||||
return shouldIgnoreMessage
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun shouldIgnoreDecryptionException(context: Context, timestamp: Long): Boolean {
|
||||
val restorationTimestamp = TextSecurePreferences.getRestorationTime(context)
|
||||
return timestamp <= restorationTimestamp
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun handleProfileUpdateIfNeeded(context: Context, content: SignalServiceContent) {
|
||||
val displayName = content.senderDisplayName.orNull() ?: return
|
||||
@@ -58,24 +52,6 @@ object SessionMetaProtocol {
|
||||
DatabaseFactory.getLokiUserDatabase(context).setDisplayName(sender, displayName)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun handleProfileKeyUpdate(context: Context, content: SignalServiceContent) {
|
||||
val message = content.dataMessage.get()
|
||||
if (!message.profileKey.isPresent) { return }
|
||||
val database = DatabaseFactory.getRecipientDatabase(context)
|
||||
val recipient = Recipient.from(context, Address.fromSerialized(content.sender), false)
|
||||
if (recipient.profileKey == null || !MessageDigest.isEqual(recipient.profileKey, message.profileKey.get())) {
|
||||
database.setProfileKey(recipient, message.profileKey.get())
|
||||
database.setUnidentifiedAccessMode(recipient, Recipient.UnidentifiedAccessMode.UNKNOWN)
|
||||
val url = content.senderProfilePictureURL.or("")
|
||||
ApplicationContext.getInstance(context).jobManager.add(RetrieveProfileAvatarJob(recipient, url))
|
||||
val userPublicKey = TextSecurePreferences.getLocalNumber(context)
|
||||
if (userPublicKey == content.sender) {
|
||||
ApplicationContext.getInstance(context).updateOpenGroupProfilePicturesIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun canUserReplyToNotification(recipient: Recipient): Boolean {
|
||||
// TODO return !recipient.address.isRSSFeed
|
||||
|
@@ -27,15 +27,12 @@ object MentionUtilities {
|
||||
var matcher = pattern.matcher(text)
|
||||
val mentions = mutableListOf<Tuple2<Range<Int>, String>>()
|
||||
var startIndex = 0
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
||||
val userPublicKey = TextSecurePreferences.getLocalNumber(context)!!
|
||||
if (matcher.find(startIndex)) {
|
||||
while (true) {
|
||||
val publicKey = text.subSequence(matcher.start() + 1, matcher.end()).toString() // +1 to get rid of the @
|
||||
val userDisplayName: String? = if (publicKey.toLowerCase() == userPublicKey.toLowerCase()) {
|
||||
TextSecurePreferences.getProfileName(context)
|
||||
} else if (publicChat != null) {
|
||||
DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, publicKey)
|
||||
} else {
|
||||
DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
}
|
||||
|
@@ -6,13 +6,8 @@ import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
|
||||
fun getOpenGroupDisplayName(recipient: Recipient, threadRecipient: Recipient, context: Context): String {
|
||||
val threadID = DatabaseFactory.getThreadDatabase(context).getOrCreateThreadIdFor(threadRecipient)
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
||||
val publicKey = recipient.address.toString()
|
||||
val displayName = if (publicChat != null) {
|
||||
DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, publicKey)
|
||||
} else {
|
||||
DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
}
|
||||
val displayName = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
// FIXME: Add short ID here?
|
||||
return displayName ?: publicKey
|
||||
}
|
@@ -3,18 +3,10 @@ package org.thoughtcrime.securesms.loki.utilities
|
||||
import android.content.Context
|
||||
import androidx.annotation.WorkerThread
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPIV2
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupV2
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
import org.session.libsession.utilities.GroupUtil
|
||||
import org.session.libsession.utilities.TextSecurePreferences
|
||||
import org.session.libsession.utilities.ProfileKeyUtil
|
||||
import org.thoughtcrime.securesms.ApplicationContext
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.thoughtcrime.securesms.groups.GroupManager
|
||||
import java.util.*
|
||||
|
||||
//TODO Refactor so methods declare specific type of checked exceptions and not generalized Exception.
|
||||
@@ -28,23 +20,6 @@ object OpenGroupUtilities {
|
||||
*
|
||||
* Consider using [org.thoughtcrime.securesms.loki.api.PublicChatInfoUpdateWorker] for lazy approach.
|
||||
*/
|
||||
@JvmStatic
|
||||
@WorkerThread
|
||||
@Throws(Exception::class)
|
||||
fun updateGroupInfo(context: Context, url: String, channel: Long) {
|
||||
// Check if open group has a related DB record.
|
||||
val groupId = GroupUtil.getEncodedOpenGroupID(OpenGroup.getId(channel, url).toByteArray())
|
||||
if (!DatabaseFactory.getGroupDatabase(context).hasGroup(groupId)) {
|
||||
throw IllegalStateException("Attempt to update open group info for non-existent DB record: $groupId")
|
||||
}
|
||||
|
||||
val info = OpenGroupAPI.getChannelInfo(channel, url).get()
|
||||
|
||||
OpenGroupAPI.updateProfileIfNeeded(channel, url, groupId, info, false)
|
||||
|
||||
EventBus.getDefault().post(GroupInfoUpdatedEvent(url, channel))
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@WorkerThread
|
||||
@Throws(Exception::class)
|
||||
|
@@ -17,10 +17,10 @@ class MentionCandidateSelectionView(context: Context, attrs: AttributeSet?, defS
|
||||
set(newValue) { field = newValue; mentionCandidateSelectionViewAdapter.mentionCandidates = newValue }
|
||||
var glide: GlideRequests? = null
|
||||
set(newValue) { field = newValue; mentionCandidateSelectionViewAdapter.glide = newValue }
|
||||
var publicChatServer: String? = null
|
||||
set(newValue) { field = newValue; mentionCandidateSelectionViewAdapter.publicChatServer = publicChatServer }
|
||||
var publicChatChannel: Long? = null
|
||||
set(newValue) { field = newValue; mentionCandidateSelectionViewAdapter.publicChatChannel = publicChatChannel }
|
||||
var openGroupServer: String? = null
|
||||
set(newValue) { field = newValue; mentionCandidateSelectionViewAdapter.openGroupServer = openGroupServer }
|
||||
var openGroupRoom: String? = null
|
||||
set(newValue) { field = newValue; mentionCandidateSelectionViewAdapter.openGroupRoom = openGroupRoom }
|
||||
var onMentionCandidateSelected: ((Mention) -> Unit)? = null
|
||||
|
||||
private val mentionCandidateSelectionViewAdapter by lazy { Adapter(context) }
|
||||
@@ -29,8 +29,8 @@ class MentionCandidateSelectionView(context: Context, attrs: AttributeSet?, defS
|
||||
var mentionCandidates = listOf<Mention>()
|
||||
set(newValue) { field = newValue; notifyDataSetChanged() }
|
||||
var glide: GlideRequests? = null
|
||||
var publicChatServer: String? = null
|
||||
var publicChatChannel: Long? = null
|
||||
var openGroupServer: String? = null
|
||||
var openGroupRoom: String? = null
|
||||
|
||||
override fun getCount(): Int {
|
||||
return mentionCandidates.count()
|
||||
@@ -49,8 +49,8 @@ class MentionCandidateSelectionView(context: Context, attrs: AttributeSet?, defS
|
||||
val mentionCandidate = getItem(position)
|
||||
cell.glide = glide
|
||||
cell.mentionCandidate = mentionCandidate
|
||||
cell.publicChatServer = publicChatServer
|
||||
cell.publicChatChannel = publicChatChannel
|
||||
cell.openGroupServer = openGroupServer
|
||||
cell.openGroupRoom = openGroupRoom
|
||||
return cell
|
||||
}
|
||||
}
|
||||
@@ -68,10 +68,10 @@ class MentionCandidateSelectionView(context: Context, attrs: AttributeSet?, defS
|
||||
}
|
||||
|
||||
fun show(mentionCandidates: List<Mention>, threadID: Long) {
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
||||
if (publicChat != null) {
|
||||
publicChatServer = publicChat.server
|
||||
publicChatChannel = publicChat.channel
|
||||
val openGroup = DatabaseFactory.getLokiThreadDatabase(context).getOpenGroupChat(threadID)
|
||||
if (openGroup != null) {
|
||||
openGroupServer = openGroup.server
|
||||
openGroupRoom = openGroup.room
|
||||
}
|
||||
this.mentionCandidates = mentionCandidates
|
||||
val layoutParams = this.layoutParams as ViewGroup.LayoutParams
|
||||
|
@@ -8,16 +8,16 @@ import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import kotlinx.android.synthetic.main.view_mention_candidate.view.*
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPI
|
||||
import org.session.libsession.messaging.mentions.Mention
|
||||
import org.session.libsession.messaging.open_groups.OpenGroupAPIV2
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests
|
||||
|
||||
class MentionCandidateView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : LinearLayout(context, attrs, defStyleAttr) {
|
||||
var mentionCandidate = Mention("", "")
|
||||
set(newValue) { field = newValue; update() }
|
||||
var glide: GlideRequests? = null
|
||||
var publicChatServer: String? = null
|
||||
var publicChatChannel: Long? = null
|
||||
var openGroupServer: String? = null
|
||||
var openGroupRoom: String? = null
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
|
||||
constructor(context: Context) : this(context, null)
|
||||
@@ -37,8 +37,8 @@ class MentionCandidateView(context: Context, attrs: AttributeSet?, defStyleAttr:
|
||||
profilePictureView.isRSSFeed = false
|
||||
profilePictureView.glide = glide!!
|
||||
profilePictureView.update()
|
||||
if (publicChatServer != null && publicChatChannel != null) {
|
||||
val isUserModerator = OpenGroupAPI.isUserModerator(mentionCandidate.publicKey, publicChatChannel!!, publicChatServer!!)
|
||||
if (openGroupServer != null && openGroupRoom != null) {
|
||||
val isUserModerator = OpenGroupAPIV2.isUserModerator(mentionCandidate.publicKey, openGroupRoom!!, openGroupServer!!)
|
||||
moderatorIconImageView.visibility = if (isUserModerator) View.VISIBLE else View.GONE
|
||||
} else {
|
||||
moderatorIconImageView.visibility = View.GONE
|
||||
|
@@ -29,7 +29,7 @@ class ProfilePictureView : RelativeLayout {
|
||||
var additionalDisplayName: String? = null
|
||||
var isRSSFeed = false
|
||||
var isLarge = false
|
||||
private val imagesCached = mutableSetOf<String>()
|
||||
private val profilePicturesCached = mutableMapOf<String,String?>()
|
||||
|
||||
// region Lifecycle
|
||||
constructor(context: Context) : super(context) {
|
||||
@@ -61,11 +61,7 @@ class ProfilePictureView : RelativeLayout {
|
||||
if (publicKey == null || publicKey.isBlank()) {
|
||||
return null
|
||||
} else {
|
||||
var result = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
||||
if (result == null && publicChat != null) {
|
||||
result = DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, publicKey)
|
||||
}
|
||||
val result = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
return result ?: publicKey
|
||||
}
|
||||
}
|
||||
@@ -146,13 +142,13 @@ class ProfilePictureView : RelativeLayout {
|
||||
private fun setProfilePictureIfNeeded(imageView: ImageView, publicKey: String, displayName: String?, @DimenRes sizeResId: Int) {
|
||||
if (publicKey.isNotEmpty()) {
|
||||
val recipient = Recipient.from(context, Address.fromSerialized(publicKey), false)
|
||||
if (imagesCached.contains(publicKey)) return
|
||||
if (profilePicturesCached.containsKey(publicKey) && profilePicturesCached[publicKey] == recipient.profileAvatar) return
|
||||
val signalProfilePicture = recipient.contactPhoto
|
||||
if (signalProfilePicture != null && (signalProfilePicture as? ProfileContactPhoto)?.avatarObject != "0"
|
||||
&& (signalProfilePicture as? ProfileContactPhoto)?.avatarObject != "") {
|
||||
val avatar = (signalProfilePicture as? ProfileContactPhoto)?.avatarObject
|
||||
if (signalProfilePicture != null && avatar != "0" && avatar != "") {
|
||||
glide.clear(imageView)
|
||||
glide.load(signalProfilePicture).diskCacheStrategy(DiskCacheStrategy.AUTOMATIC).circleCrop().into(imageView)
|
||||
imagesCached.add(publicKey)
|
||||
profilePicturesCached[publicKey] = recipient.profileAvatar
|
||||
} else {
|
||||
val sizeInPX = resources.getDimensionPixelSize(sizeResId)
|
||||
glide.clear(imageView)
|
||||
@@ -162,7 +158,7 @@ class ProfilePictureView : RelativeLayout {
|
||||
publicKey,
|
||||
displayName
|
||||
)).diskCacheStrategy(DiskCacheStrategy.ALL).circleCrop().into(imageView)
|
||||
imagesCached.add(publicKey)
|
||||
profilePicturesCached[publicKey] = recipient.profileAvatar
|
||||
}
|
||||
} else {
|
||||
imageView.setImageDrawable(null)
|
||||
@@ -170,7 +166,7 @@ class ProfilePictureView : RelativeLayout {
|
||||
}
|
||||
|
||||
fun recycle() {
|
||||
imagesCached.clear()
|
||||
profilePicturesCached.clear()
|
||||
}
|
||||
// endregion
|
||||
}
|
||||
}
|
||||
|
@@ -58,11 +58,7 @@ class UserView : LinearLayout {
|
||||
val contactContext = Contact.contextForRecipient(user)
|
||||
return it.displayName(contactContext)
|
||||
}
|
||||
var result = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(openGroupThreadID)
|
||||
if (result == null && publicChat != null) {
|
||||
result = DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, publicKey)
|
||||
}
|
||||
val result = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(publicKey)
|
||||
return result ?: publicKey
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.mms;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.session.libsession.messaging.file_server.FileServerAPI;
|
||||
import org.session.libsession.messaging.file_server.FileServerAPIV2;
|
||||
|
||||
public class PushMediaConstraints extends MediaConstraints {
|
||||
|
||||
@@ -21,26 +21,26 @@ public class PushMediaConstraints extends MediaConstraints {
|
||||
|
||||
@Override
|
||||
public int getImageMaxSize(Context context) {
|
||||
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
|
||||
return (int) (((double) FileServerAPIV2.maxFileSize) / FileServerAPIV2.fileSizeORMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGifMaxSize(Context context) {
|
||||
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
|
||||
return (int) (((double) FileServerAPIV2.maxFileSize) / FileServerAPIV2.fileSizeORMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVideoMaxSize(Context context) {
|
||||
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
|
||||
return (int) (((double) FileServerAPIV2.maxFileSize) / FileServerAPIV2.fileSizeORMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAudioMaxSize(Context context) {
|
||||
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
|
||||
return (int) (((double) FileServerAPIV2.maxFileSize) / FileServerAPIV2.fileSizeORMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDocumentMaxSize(Context context) {
|
||||
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
|
||||
return (int) (((double) FileServerAPIV2.maxFileSize) / FileServerAPIV2.fileSizeORMultiplier);
|
||||
}
|
||||
}
|
||||
|
@@ -56,6 +56,7 @@ import org.thoughtcrime.securesms.database.ThreadDatabase;
|
||||
import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord;
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord;
|
||||
import org.thoughtcrime.securesms.database.model.MmsMessageRecord;
|
||||
import org.thoughtcrime.securesms.loki.api.OpenGroupManager;
|
||||
import org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol;
|
||||
import org.thoughtcrime.securesms.loki.utilities.MentionUtilities;
|
||||
import org.thoughtcrime.securesms.mms.SlideDeck;
|
||||
@@ -286,6 +287,9 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
||||
} finally {
|
||||
if (telcoCursor != null) telcoCursor.close();
|
||||
if (pushCursor != null) pushCursor.close();
|
||||
if (!OpenGroupManager.INSTANCE.isAllCaughtUp()) {
|
||||
OpenGroupManager.INSTANCE.setAllCaughtUp(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,7 @@ import org.session.libsession.utilities.recipients.Recipient;
|
||||
import org.session.libsession.utilities.Debouncer;
|
||||
import org.session.libsignal.utilities.ThreadUtils;
|
||||
import org.thoughtcrime.securesms.ApplicationContext;
|
||||
import org.thoughtcrime.securesms.loki.api.OpenGroupManager;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -42,18 +43,12 @@ public class OptimizedMessageNotifier implements MessageNotifier {
|
||||
@Override
|
||||
public void updateNotification(@NonNull Context context) {
|
||||
Poller poller = ApplicationContext.getInstance(context).poller;
|
||||
// FIXME: Open group handling
|
||||
boolean isCaughtUp = true;
|
||||
if (poller != null) {
|
||||
isCaughtUp = isCaughtUp && poller.isCaughtUp();
|
||||
}
|
||||
|
||||
// FIXME: Open group handling
|
||||
/*
|
||||
if (publicChatManager != null) {
|
||||
isCaughtUp = isCaughtUp && publicChatManager.areAllCaughtUp();
|
||||
}
|
||||
*/
|
||||
isCaughtUp = isCaughtUp && OpenGroupManager.INSTANCE.isAllCaughtUp();
|
||||
|
||||
if (isCaughtUp) {
|
||||
performOnBackgroundThreadIfNeeded(() -> wrapped.updateNotification(context));
|
||||
@@ -65,18 +60,12 @@ public class OptimizedMessageNotifier implements MessageNotifier {
|
||||
@Override
|
||||
public void updateNotification(@NonNull Context context, long threadId) {
|
||||
Poller lokiPoller = ApplicationContext.getInstance(context).poller;
|
||||
// FIXME: Open group handling
|
||||
boolean isCaughtUp = true;
|
||||
if (lokiPoller != null) {
|
||||
isCaughtUp = isCaughtUp && lokiPoller.isCaughtUp();
|
||||
}
|
||||
|
||||
// FIXME: Open group handling
|
||||
/*
|
||||
if (publicChatManager != null) {
|
||||
isCaughtUp = isCaughtUp && publicChatManager.areAllCaughtUp();
|
||||
}
|
||||
*/
|
||||
isCaughtUp = isCaughtUp && OpenGroupManager.INSTANCE.isAllCaughtUp();
|
||||
|
||||
if (isCaughtUp) {
|
||||
performOnBackgroundThreadIfNeeded(() -> wrapped.updateNotification(context, threadId));
|
||||
@@ -88,18 +77,12 @@ public class OptimizedMessageNotifier implements MessageNotifier {
|
||||
@Override
|
||||
public void updateNotification(@NonNull Context context, long threadId, boolean signal) {
|
||||
Poller lokiPoller = ApplicationContext.getInstance(context).poller;
|
||||
// FIXME: Open group handling
|
||||
boolean isCaughtUp = true;
|
||||
if (lokiPoller != null) {
|
||||
isCaughtUp = isCaughtUp && lokiPoller.isCaughtUp();
|
||||
}
|
||||
|
||||
// FIXME: Open group handling
|
||||
/*
|
||||
if (publicChatManager != null) {
|
||||
isCaughtUp = isCaughtUp && publicChatManager.areAllCaughtUp();
|
||||
}
|
||||
*/
|
||||
isCaughtUp = isCaughtUp && OpenGroupManager.INSTANCE.isAllCaughtUp();
|
||||
|
||||
if (isCaughtUp) {
|
||||
performOnBackgroundThreadIfNeeded(() -> wrapped.updateNotification(context, threadId, signal));
|
||||
@@ -111,18 +94,12 @@ public class OptimizedMessageNotifier implements MessageNotifier {
|
||||
@Override
|
||||
public void updateNotification(@androidx.annotation.NonNull Context context, boolean signal, int reminderCount) {
|
||||
Poller lokiPoller = ApplicationContext.getInstance(context).poller;
|
||||
// FIXME: Open group handling
|
||||
boolean isCaughtUp = true;
|
||||
if (lokiPoller != null) {
|
||||
isCaughtUp = isCaughtUp && lokiPoller.isCaughtUp();
|
||||
}
|
||||
|
||||
// FIXME: Open group handling
|
||||
/*
|
||||
if (publicChatManager != null) {
|
||||
isCaughtUp = isCaughtUp && publicChatManager.areAllCaughtUp();
|
||||
}
|
||||
*/
|
||||
isCaughtUp = isCaughtUp && OpenGroupManager.INSTANCE.isAllCaughtUp();
|
||||
|
||||
if (isCaughtUp) {
|
||||
performOnBackgroundThreadIfNeeded(() -> wrapped.updateNotification(context, signal, reminderCount));
|
||||
|
@@ -9,13 +9,14 @@ import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||
import org.thoughtcrime.securesms.jobs.RetrieveProfileAvatarJob
|
||||
|
||||
class ProfileManager: SSKEnvironment.ProfileManagerProtocol {
|
||||
|
||||
override fun setDisplayName(context: Context, recipient: Recipient, displayName: String?) {
|
||||
val sessionID = recipient.address.serialize()
|
||||
// New API
|
||||
val contactDatabase = DatabaseFactory.getSessionContactDatabase(context)
|
||||
var contact = contactDatabase.getContactWithSessionID(sessionID)
|
||||
if (contact == null) contact = Contact(sessionID)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadIdFor(recipient.address)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadId(recipient.address)
|
||||
if (contact.nickname != displayName) {
|
||||
contact.nickname = displayName
|
||||
contactDatabase.setContact(contact)
|
||||
@@ -35,7 +36,7 @@ class ProfileManager: SSKEnvironment.ProfileManagerProtocol {
|
||||
val contactDatabase = DatabaseFactory.getSessionContactDatabase(context)
|
||||
var contact = contactDatabase.getContactWithSessionID(sessionID)
|
||||
if (contact == null) contact = Contact(sessionID)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadIdFor(recipient.address)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadId(recipient.address)
|
||||
if (contact.name != profileName) {
|
||||
contact.name = profileName
|
||||
contactDatabase.setContact(contact)
|
||||
@@ -49,7 +50,7 @@ class ProfileManager: SSKEnvironment.ProfileManagerProtocol {
|
||||
val contactDatabase = DatabaseFactory.getSessionContactDatabase(context)
|
||||
var contact = contactDatabase.getContactWithSessionID(sessionID)
|
||||
if (contact == null) contact = Contact(sessionID)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadIdFor(recipient.address)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadId(recipient.address)
|
||||
if (contact.profilePictureURL != profilePictureURL) {
|
||||
contact.profilePictureURL = profilePictureURL
|
||||
contactDatabase.setContact(contact)
|
||||
@@ -64,7 +65,7 @@ class ProfileManager: SSKEnvironment.ProfileManagerProtocol {
|
||||
val contactDatabase = DatabaseFactory.getSessionContactDatabase(context)
|
||||
var contact = contactDatabase.getContactWithSessionID(sessionID)
|
||||
if (contact == null) contact = Contact(sessionID)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadIdFor(recipient.address)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadId(recipient.address)
|
||||
if (!contact.profilePictureEncryptionKey.contentEquals(profileKey)) {
|
||||
contact.profilePictureEncryptionKey = profileKey
|
||||
contactDatabase.setContact(contact)
|
||||
@@ -76,17 +77,13 @@ class ProfileManager: SSKEnvironment.ProfileManagerProtocol {
|
||||
database.setUnidentifiedAccessMode(recipient, unidentifiedAccessMode)
|
||||
}
|
||||
|
||||
override fun updateOpenGroupProfilePicturesIfNeeded(context: Context) {
|
||||
ApplicationContext.getInstance(context).updateOpenGroupProfilePicturesIfNeeded()
|
||||
}
|
||||
|
||||
override fun getDisplayName(context: Context, recipient: Recipient): String? {
|
||||
val sessionID = recipient.address.serialize()
|
||||
val contactDatabase = DatabaseFactory.getSessionContactDatabase(context)
|
||||
var contact = contactDatabase.getContactWithSessionID(sessionID)
|
||||
if (contact == null) {
|
||||
contact = Contact(sessionID)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadIdFor(recipient.address)
|
||||
contact.threadID = DatabaseFactory.getStorage(context).getThreadId(recipient.address)
|
||||
contact.name = DatabaseFactory.getLokiUserDatabase(context).getDisplayName(sessionID) ?: recipient.profileName ?: recipient.name
|
||||
contactDatabase.setContact(contact)
|
||||
}
|
||||
|
@@ -1,706 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Session</string>
|
||||
<string name="yes">Da</string>
|
||||
<string name="no">Ne</string>
|
||||
<string name="delete">Obriši</string>
|
||||
<string name="ban">Ban</string>
|
||||
<string name="please_wait">Sačekajte...</string>
|
||||
<string name="save">Spremi</string>
|
||||
<string name="note_to_self">Osobna bilješka</string>
|
||||
<string name="version_s">Version %s</string>
|
||||
<!-- AbstractNotificationBuilder -->
|
||||
<string name="AbstractNotificationBuilder_new_message">Nova poruka</string>
|
||||
<!-- AlbumThumbnailView -->
|
||||
<string name="AlbumThumbnailView_plus">\+%d</string>
|
||||
<!-- ApplicationPreferencesActivity -->
|
||||
<plurals name="ApplicationPreferencesActivity_messages_per_conversation">
|
||||
<item quantity="one">%d poruka po razgovoru</item>
|
||||
<item quantity="few">%d poruke po razgovoru</item>
|
||||
<item quantity="many">%d poruka po razgovoru</item>
|
||||
<item quantity="other">%d poruka po razgovoru</item>
|
||||
</plurals>
|
||||
<string name="ApplicationPreferencesActivity_delete_all_old_messages_now">Obriši sve stare poruke?</string>
|
||||
<plurals name="ApplicationPreferencesActivity_this_will_immediately_trim_all_conversations_to_the_d_most_recent_messages">
|
||||
<item quantity="one">Ovo će automatski skratiti sve razgovore na odabrani broj poruka.</item>
|
||||
<item quantity="few">Ovo će automatski skratiti sve razgovore na %d najnovije poruke.</item>
|
||||
<item quantity="many">Ovo će automatski skratiti sve razgovore na %d najnovijih poruka.</item>
|
||||
<item quantity="other">Ovo će automatski skratiti sve razgovore na %d najnovijih poruka.</item>
|
||||
</plurals>
|
||||
<string name="ApplicationPreferencesActivity_delete">Obriši</string>
|
||||
<string name="ApplicationPreferencesActivity_On">Uključeno</string>
|
||||
<string name="ApplicationPreferencesActivity_Off">Isključeno</string>
|
||||
<!-- DraftDatabase -->
|
||||
<string name="DraftDatabase_Draft_image_snippet">(slika)</string>
|
||||
<string name="DraftDatabase_Draft_audio_snippet">(zvuk)</string>
|
||||
<string name="DraftDatabase_Draft_video_snippet">(video)</string>
|
||||
<string name="DraftDatabase_Draft_quote_snippet">(odgovor)</string>
|
||||
<!-- AttchmentManager -->
|
||||
<string name="AttachmentManager_cant_open_media_selection">Nije moguće pronaći aplikaciju za odabir medija.</string>
|
||||
<string name="AttachmentManager_signal_requires_the_external_storage_permission_in_order_to_attach_photos_videos_or_audio">Session zahtijeva dozvolu pristupa Pohrani podataka za umetanje slikovnih i audio-vizualnih priloga ali zahtjev biva odbijen. Molim otvorite opcije aplikacije, odaberite \"Dozvole\" i uključite \"Pohrana\".</string>
|
||||
<string name="AttachmentManager_signal_requires_contacts_permission_in_order_to_attach_contact_information">Session zahtijeva dozvolu pristupa Kontaktima za prilaganje informacije o kontaktima ali pristup biva odbijen. Molim otvorite opcije aplikacije, odaberite \"Dozvole\" i uključite \"Kontakti\".</string>
|
||||
<string name="AttachmentManager_signal_requires_the_camera_permission_in_order_to_take_photos_but_it_has_been_permanently_denied">Session zahtijeva dozvolu pristupa Kameri za omogućavanje slikanja ali pristup biva odbijen. Molim otvorite opcije aplikacije, odaberite \"Dozvole\" i uključite \"Kamera\".</string>
|
||||
<!-- AudioSlidePlayer -->
|
||||
<string name="AudioSlidePlayer_error_playing_audio">Greška prilikom reprodukcije zvuka!</string>
|
||||
<!-- BucketedThreadMedia -->
|
||||
<string name="BucketedThreadMedia_Today">Danas</string>
|
||||
<string name="BucketedThreadMedia_Yesterday">Jučer</string>
|
||||
<string name="BucketedThreadMedia_This_week">Ovaj tjedan</string>
|
||||
<string name="BucketedThreadMedia_This_month">Ovaj mjesec</string>
|
||||
<!-- CommunicationActions -->
|
||||
<string name="CommunicationActions_no_browser_found">Web pretraživać nije pronađen.</string>
|
||||
<!-- ContactsCursorLoader -->
|
||||
<string name="ContactsCursorLoader_groups">Grupe</string>
|
||||
<!-- ConversationItem -->
|
||||
<string name="ConversationItem_error_not_delivered">Slanje nije uspjelo, dodirnite za detalje</string>
|
||||
<string name="ConversationItem_received_key_exchange_message_tap_to_process">Poruka za razmjenu ključeva je primljena, pritisnite da biste nastavili.</string>
|
||||
<string name="ConversationItem_group_action_left">%1$s je napustio grupu.</string>
|
||||
<string name="ConversationItem_click_to_approve_unencrypted">Slanje neuspješno, pritisnite za nesigurnu rezervu</string>
|
||||
<string name="ConversationItem_unable_to_open_media">Nije moguće pronaći aplikaciju za otvaranje ovog medija.</string>
|
||||
<string name="ConversationItem_copied_text">Kopirano %s</string>
|
||||
<string name="ConversationItem_read_more">Pročitaj više</string>
|
||||
<string name="ConversationItem_download_more">Preuzmi više</string>
|
||||
<string name="ConversationItem_pending">Na čekanju</string>
|
||||
<!-- ConversationActivity -->
|
||||
<string name="ConversationActivity_add_attachment">Dodaj privitak</string>
|
||||
<string name="ConversationActivity_select_contact_info">Odaberite informacije kontakta</string>
|
||||
<string name="ConversationActivity_sorry_there_was_an_error_setting_your_attachment">Došlo je do greške prilikom postavljanja privitka.</string>
|
||||
<string name="ConversationActivity_message">Message</string>
|
||||
<string name="ConversationActivity_invalid_recipient">Naispravan primatelj!</string>
|
||||
<string name="ConversationActivity_added_to_home_screen">Dodano na početni ekran</string>
|
||||
<string name="ConversationActivity_leave_group">Napusti grupu?</string>
|
||||
<string name="ConversationActivity_are_you_sure_you_want_to_leave_this_group">Jeste li sigurni da želite napustiti ovu grupu?</string>
|
||||
<string name="ConversationActivity_error_leaving_group">Greška pri napuštanju grupe</string>
|
||||
<string name="ConversationActivity_unblock_this_contact_question">Ukloni blokadu ovog kontakta?</string>
|
||||
<string name="ConversationActivity_you_will_once_again_be_able_to_receive_messages_and_calls_from_this_contact">Ponovno ćete moći primati poruke ili pozive ovog korisnika.</string>
|
||||
<string name="ConversationActivity_unblock">Ukloni blokadu</string>
|
||||
<string name="ConversationActivity_attachment_exceeds_size_limits">Privitak prelazi ograničenje veličine za tip poruke koju šaljete.</string>
|
||||
<string name="ConversationActivity_unable_to_record_audio">Nije moguće snimati svuk!</string>
|
||||
<string name="ConversationActivity_there_is_no_app_available_to_handle_this_link_on_your_device">Na vašem uređaju ne postoji aplikacija koja bi rukovala ovom poveznicom.</string>
|
||||
<string name="ConversationActivity_invite_to_open_group">Add members</string>
|
||||
<string name="ConversationActivity_join_open_group">Join %s</string>
|
||||
<string name="ConversationActivity_join_open_group_confirmation_message">Are you sure you want to join the <b>%s</b> open group?</string>
|
||||
<string name="ConversationActivity_to_send_audio_messages_allow_signal_access_to_your_microphone">Kako biste poslali audio poruku, dozvolite Sessionu pristup vašem mikrofonu.</string>
|
||||
<string name="ConversationActivity_signal_requires_the_microphone_permission_in_order_to_send_audio_messages">Session zahtijeva dozvolu pristupa Mikrofonu za slanje zvučnih poruka ali pristup biva odbijen. Molim otvorite opcije aplikacije, odaberite \"Dozvole\" i uključite \"Mikrofon\".</string>
|
||||
<string name="ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera">Kako biste snimili slike i video, dozvolite Sessionu pristup kameri.</string>
|
||||
<string name="ConversationActivity_signal_needs_the_camera_permission_to_take_photos_or_video">Session zahtijeva dozvolu Kameri za fotografiranje ili snimanje videa, ali pristup biva odbijen. Molim nastavite s postavkama aplikacije, odaberite \"Dozvole\" i omogućite \"Kamera\". </string>
|
||||
<string name="ConversationActivity_signal_needs_camera_permissions_to_take_photos_or_video">Session treba pristup kameri kako bi snimio slike ili video.</string>
|
||||
<string name="ConversationActivity_quoted_contact_message">%1$s%2$s</string>
|
||||
<string name="ConversationActivity_search_position">%1$d od %2$d</string>
|
||||
<string name="ConversationActivity_no_results">Nema rezultata</string>
|
||||
<!-- ConversationAdapter -->
|
||||
<plurals name="ConversationAdapter_n_unread_messages">
|
||||
<item quantity="one">%d nepročitana poruka</item>
|
||||
<item quantity="few">%d nepročitane poruke</item>
|
||||
<item quantity="many">%d nepročitanih poruka</item>
|
||||
<item quantity="other">%d nepročitanih poruka</item>
|
||||
</plurals>
|
||||
<!-- ConversationFragment -->
|
||||
<plurals name="ConversationFragment_delete_selected_messages">
|
||||
<item quantity="one">Obriši odabrane poruke?</item>
|
||||
<item quantity="few">Obriši odabrane poruke?</item>
|
||||
<item quantity="many">Obriši odabrane poruke?</item>
|
||||
<item quantity="other">Obriši odabrane poruke?</item>
|
||||
</plurals>
|
||||
<plurals name="ConversationFragment_this_will_permanently_delete_all_n_selected_messages">
|
||||
<item quantity="one">Ovo će trajno obrisati odabrane poruke.</item>
|
||||
<item quantity="few">Ovo će trajno obrisati sve %1$d odabrane poruke.</item>
|
||||
<item quantity="many">Ovo će trajno obrisati svih %1$d odabranih poruka.</item>
|
||||
<item quantity="other">Ovo će trajno obrisati svih %1$d odabranih poruka.</item>
|
||||
</plurals>
|
||||
<string name="ConversationFragment_ban_selected_user">Ban this user?</string>
|
||||
<string name="ConversationFragment_save_to_sd_card">Spremi na disk?</string>
|
||||
<plurals name="ConversationFragment_saving_n_media_to_storage_warning">
|
||||
<item quantity="one">Spremanje svih medija na disk će omogućiti pristup mediju iz drugih aplikacija na vašem uređaju.\n\nNastavi?</item>
|
||||
<item quantity="few">Spremanje sva %1$d medija na disk će omogućiti pristup mediju iz drugih aplikacija na vašem uređaju.\n\nNastavi?</item>
|
||||
<item quantity="many">Spremanje svih %1$d medija na disk će omogućiti pristup mediju iz drugih aplikacija na vašem uređaju.\n\nNastavi?</item>
|
||||
<item quantity="other">Spremanje svih %1$d medija na disk će omogućiti pristup mediju iz drugih aplikacija na vašem uređaju.\n\nNastavi?</item>
|
||||
</plurals>
|
||||
<plurals name="ConversationFragment_error_while_saving_attachments_to_sd_card">
|
||||
<item quantity="one">Greška prilikom spremanja privitaka na disk!</item>
|
||||
<item quantity="few">Greška prilikom spremanja privitaka na disk!</item>
|
||||
<item quantity="many">Greška prilikom spremanja privitaka na disk!</item>
|
||||
<item quantity="other">Greška prilikom spremanja privitaka na disk!</item>
|
||||
</plurals>
|
||||
<plurals name="ConversationFragment_saving_n_attachments">
|
||||
<item quantity="one">Spremanje privitaka</item>
|
||||
<item quantity="few">Spremanje %1$d privitka</item>
|
||||
<item quantity="many">Spremanje %1$d privitaka</item>
|
||||
<item quantity="other">Spremanje %1$d privitaka</item>
|
||||
</plurals>
|
||||
<plurals name="ConversationFragment_saving_n_attachments_to_sd_card">
|
||||
<item quantity="one">Spremanje privitaka na disk...</item>
|
||||
<item quantity="few">Spremanje %1$d privitka na disk...</item>
|
||||
<item quantity="many">Spremanje %1$d privitaka na disk...</item>
|
||||
<item quantity="other">Spremanje %1$d privitaka na disk...</item>
|
||||
</plurals>
|
||||
<string name="ConversationFragment_pending">U toku...</string>
|
||||
<string name="ConversationFragment_push">Podaci (Session)</string>
|
||||
<string name="ConversationFragment_mms">MMS</string>
|
||||
<string name="ConversationFragment_sms">SMS</string>
|
||||
<string name="ConversationFragment_deleting">Brisanje</string>
|
||||
<string name="ConversationFragment_deleting_messages">Brisanje poruka...</string>
|
||||
<string name="ConversationFragment_banning">Banning</string>
|
||||
<string name="ConversationFragment_banning_user">Banning user…</string>
|
||||
<string name="ConversationFragment_quoted_message_not_found">Originalna poruka nije pronađena</string>
|
||||
<string name="ConversationFragment_quoted_message_no_longer_available">Originalna poruka više nije dostupna</string>
|
||||
<!-- ConversationListItem -->
|
||||
<string name="ConversationListItem_key_exchange_message">Poruka za razmjenu ključa</string>
|
||||
<!-- CreateProfileActivity -->
|
||||
<string name="CreateProfileActivity_profile_photo">Profilna slika</string>
|
||||
<!-- CustomDefaultPreference -->
|
||||
<string name="CustomDefaultPreference_using_custom">Koristeći prilagođeno: %s</string>
|
||||
<string name="CustomDefaultPreference_using_default">Koristeći zadano: %s</string>
|
||||
<string name="CustomDefaultPreference_none">Niti jedna</string>
|
||||
<!-- DateUtils -->
|
||||
<string name="DateUtils_just_now">Sada</string>
|
||||
<string name="DateUtils_minutes_ago">%d min</string>
|
||||
<string name="DateUtils_today">Danas</string>
|
||||
<string name="DateUtils_yesterday">Jučer</string>
|
||||
<!-- DeviceListItem -->
|
||||
<string name="DeviceListItem_today">Danas</string>
|
||||
<!-- DocumentView -->
|
||||
<string name="DocumentView_unknown_file">Nepoznata datoteka</string>
|
||||
<!-- GiphyActivity -->
|
||||
<string name="GiphyActivity_error_while_retrieving_full_resolution_gif">Greška pri dohvaćanju GIFa pune rezolucije</string>
|
||||
<!-- GiphyFragmentPageAdapter -->
|
||||
<string name="GiphyFragmentPagerAdapter_gifs">GIFovi</string>
|
||||
<string name="GiphyFragmentPagerAdapter_stickers">Naljepnice</string>
|
||||
<!-- CropImageActivity -->
|
||||
<string name="CropImageActivity_profile_avatar">Slika profila</string>
|
||||
<!-- InputPanel -->
|
||||
<string name="InputPanel_tap_and_hold_to_record_a_voice_message_release_to_send">Pritisnite i držite kako biste snimili glasovnu poruku, pustite za slanje</string>
|
||||
<!-- LongMessageActivity -->
|
||||
<string name="LongMessageActivity_unable_to_find_message">Nije moguće naći poruku</string>
|
||||
<string name="LongMessageActivity_message_from_s">Poruka od %1$s</string>
|
||||
<string name="LongMessageActivity_your_message">Vaša poruka</string>
|
||||
<!-- MediaOverviewActivity -->
|
||||
<string name="MediaOverviewActivity_Media">Medij</string>
|
||||
<plurals name="MediaOverviewActivity_Media_delete_confirm_title">
|
||||
<item quantity="one">Izbriši označenu poruku?</item>
|
||||
<item quantity="few">Izbriši označene poruke?</item>
|
||||
<item quantity="many">Izbriši označene poruke?</item>
|
||||
<item quantity="other">Izbriši označene poruke?</item>
|
||||
</plurals>
|
||||
<plurals name="MediaOverviewActivity_Media_delete_confirm_message">
|
||||
<item quantity="one">Ovo će trajno obrisati označenu poruku.</item>
|
||||
<item quantity="few">Broj poruka koji će biti trajno izbrisan: %1$d</item>
|
||||
<item quantity="many">Broj poruka koji će biti trajno izbrisan: %1$d</item>
|
||||
<item quantity="other">Broj poruka koji će biti trajno izbrisan: %1$d</item>
|
||||
</plurals>
|
||||
<string name="MediaOverviewActivity_Media_delete_progress_title">Brisanje</string>
|
||||
<string name="MediaOverviewActivity_Media_delete_progress_message">Brisanje poruka...</string>
|
||||
<string name="MediaOverviewActivity_Documents">Dokumenti</string>
|
||||
<string name="MediaOverviewActivity_Select_all">Odaberi sve</string>
|
||||
<string name="MediaOverviewActivity_collecting_attachments">Prikupljanje privitaka...</string>
|
||||
<!-- NotificationMmsMessageRecord -->
|
||||
<string name="NotificationMmsMessageRecord_multimedia_message">Multimedijalna poruka</string>
|
||||
<string name="NotificationMmsMessageRecord_downloading_mms_message">Preuzimanje MMS poruke</string>
|
||||
<string name="NotificationMmsMessageRecord_error_downloading_mms_message">Greška pri preuzimanju MMS poruke, pritisnite za ponovni pokušaj</string>
|
||||
<!-- MediaPickerActivity -->
|
||||
<string name="MediaPickerActivity_send_to">Send to %s</string>
|
||||
<!-- MediaSendActivity -->
|
||||
<string name="MediaSendActivity_add_a_caption">Add a caption...</string>
|
||||
<string name="MediaSendActivity_an_item_was_removed_because_it_exceeded_the_size_limit">Stavka je uklonjena jer je prešla limit veličine</string>
|
||||
<string name="MediaSendActivity_camera_unavailable">Kamera nije dostupna</string>
|
||||
<string name="MediaSendActivity_message_to_s">Message to %s</string>
|
||||
<plurals name="MediaSendActivity_cant_share_more_than_n_items">
|
||||
<item quantity="one">Ne možete dijeliti više od %dstavke.</item>
|
||||
<item quantity="few">Ne možete dijeliti više od %d stavki.</item>
|
||||
<item quantity="many">Ne možete dijeliti više od %dstavki.</item>
|
||||
<item quantity="other">Ne možete dijeliti više od %dstavki.</item>
|
||||
</plurals>
|
||||
<!-- MediaRepository -->
|
||||
<string name="MediaRepository_all_media">Svi mediji</string>
|
||||
<!-- MessageRecord -->
|
||||
<string name="MessageRecord_message_encrypted_with_a_legacy_protocol_version_that_is_no_longer_supported">Primljena je poruka kriptirana starom inačicom Session aplikacije koja više nije podržana. Molimo zapitajte pošiljatelja da ažurira na najnoviju inačicu aplikacije i ponovno pošalje poruku.</string>
|
||||
<string name="MessageRecord_left_group">Napustili ste grupu.</string>
|
||||
<string name="MessageRecord_you_updated_group">Ažurirali ste grupu.</string>
|
||||
<string name="MessageRecord_s_updated_group">%s je ažurirao grupu.</string>
|
||||
<!-- ExpirationDialog -->
|
||||
<string name="ExpirationDialog_disappearing_messages">Nestajuće poruke</string>
|
||||
<string name="ExpirationDialog_your_messages_will_not_expire">Vaše poruke neće isteći.</string>
|
||||
<string name="ExpirationDialog_your_messages_will_disappear_s_after_they_have_been_seen">Primljene i poslane poruke u ovom razgovoru će nestati %s nakon što su viđene.</string>
|
||||
<!-- PassphrasePromptActivity -->
|
||||
<string name="PassphrasePromptActivity_enter_passphrase">Unesite lozinku</string>
|
||||
<!-- RecipientPreferencesActivity -->
|
||||
<string name="RecipientPreferenceActivity_block_this_contact_question">Blokiraj kontakt?</string>
|
||||
<string name="RecipientPreferenceActivity_you_will_no_longer_receive_messages_and_calls_from_this_contact">Nećete više primati poruke i pozive ovog korisnika.</string>
|
||||
<string name="RecipientPreferenceActivity_block">Blokiraj</string>
|
||||
<string name="RecipientPreferenceActivity_unblock_this_contact_question">Ukloni blokadu ovog kontakta?</string>
|
||||
<string name="RecipientPreferenceActivity_you_will_once_again_be_able_to_receive_messages_and_calls_from_this_contact">Ponovno ćete moći primati poruke ili pozive ovog korisnika.</string>
|
||||
<string name="RecipientPreferenceActivity_unblock">Ukloni blokadu</string>
|
||||
<!-- Slide -->
|
||||
<string name="Slide_image">Slika</string>
|
||||
<string name="Slide_audio">Audio</string>
|
||||
<string name="Slide_video">Video</string>
|
||||
<!-- SmsMessageRecord -->
|
||||
<string name="SmsMessageRecord_received_corrupted_key_exchange_message">Primljena iskvarena poruka
|
||||
razmjene ključeva!</string>
|
||||
<string name="SmsMessageRecord_received_key_exchange_message_for_invalid_protocol_version">Primljena poruka razmjene ključeva za pogrešnu inačicu protokola.</string>
|
||||
<string name="SmsMessageRecord_received_message_with_new_safety_number_tap_to_process">Primljena je poruka s novim sigurnosnim brojem. Pritisnite za obradu i prikaz.</string>
|
||||
<string name="SmsMessageRecord_secure_session_reset">Resetiranje sigurne sesije.</string>
|
||||
<string name="SmsMessageRecord_secure_session_reset_s">%s resetiranje sigurne sesije.</string>
|
||||
<string name="SmsMessageRecord_duplicate_message">Dupla poruka.</string>
|
||||
<!-- ThreadRecord -->
|
||||
<string name="ThreadRecord_group_updated">Grupa je ažurirana</string>
|
||||
<string name="ThreadRecord_left_the_group">Napustio/la grupu</string>
|
||||
<string name="ThreadRecord_secure_session_reset">Resetiranje sigurne sesije.</string>
|
||||
<string name="ThreadRecord_draft">Skica:</string>
|
||||
<string name="ThreadRecord_called">Zvali ste</string>
|
||||
<string name="ThreadRecord_called_you">Zvali su vas</string>
|
||||
<string name="ThreadRecord_missed_call">Propušteni poziv</string>
|
||||
<string name="ThreadRecord_media_message">Multimedijalna poruka</string>
|
||||
<string name="ThreadRecord_s_is_on_signal">%s je dostupan na Sessionu!</string>
|
||||
<string name="ThreadRecord_disappearing_messages_disabled">Disappearing messages disabled</string>
|
||||
<string name="ThreadRecord_disappearing_message_time_updated_to_s">Vrijeme nestajanja poruke postavljeno na %s</string>
|
||||
<string name="ThreadRecord_s_took_a_screenshot">%s took a screenshot.</string>
|
||||
<string name="ThreadRecord_media_saved_by_s">Media saved by %s.</string>
|
||||
<string name="ThreadRecord_safety_number_changed">Sigurnosni broj je izmijenjen</string>
|
||||
<string name="ThreadRecord_your_safety_number_with_s_has_changed">Vaš sigurnosni broj s %s je izmjenjen.</string>
|
||||
<string name="ThreadRecord_you_marked_verified">Označili ste provjerenim</string>
|
||||
<string name="ThreadRecord_you_marked_unverified">Označili ste nepotvrđenim</string>
|
||||
<string name="ThreadRecord_empty_message">This conversation is empty</string>
|
||||
<string name="ThreadRecord_open_group_invitation">Open group invitation</string>
|
||||
<!-- UpdateApkReadyListener -->
|
||||
<string name="UpdateApkReadyListener_Signal_update">Session ažuriranje</string>
|
||||
<string name="UpdateApkReadyListener_a_new_version_of_signal_is_available_tap_to_update">Nova inačica Sessiona je dostupna, pritisnite za ažuriranje</string>
|
||||
<!-- MessageDisplayHelper -->
|
||||
<string name="MessageDisplayHelper_bad_encrypted_message">Loše kriptirana poruka</string>
|
||||
<string name="MessageDisplayHelper_message_encrypted_for_non_existing_session">Poruka kriptirana za nepostojeću sesiju</string>
|
||||
<!-- MmsMessageRecord -->
|
||||
<string name="MmsMessageRecord_bad_encrypted_mms_message">Loše kriptirana MMS poruka</string>
|
||||
<string name="MmsMessageRecord_mms_message_encrypted_for_non_existing_session">MMS poruka kriptirana za nepostojeću sesiju</string>
|
||||
<!-- MuteDialog -->
|
||||
<string name="MuteDialog_mute_notifications">Utišaj obavijesti</string>
|
||||
<!-- KeyCachingService -->
|
||||
<string name="KeyCachingService_signal_passphrase_cached">Pritisnite za otvaranje.</string>
|
||||
<string name="KeyCachingService_passphrase_cached">Session je otključan</string>
|
||||
<string name="KeyCachingService_lock">Zaključaj Session</string>
|
||||
<!-- MediaPreviewActivity -->
|
||||
<string name="MediaPreviewActivity_you">Vi</string>
|
||||
<string name="MediaPreviewActivity_unssuported_media_type">Nepodržani tip medija</string>
|
||||
<string name="MediaPreviewActivity_draft">Skica</string>
|
||||
<string name="MediaPreviewActivity_signal_needs_the_storage_permission_in_order_to_write_to_external_storage_but_it_has_been_permanently_denied">Session zahtjeva pristup pohrani kako bi se omogućilo zapisivanje podataka na vanjski medij, ali je trajno odbijeno. Molimo nastavite do opcija aplikacije, odaberite \"Dozvole\", i uključite \"Pohrana\".</string>
|
||||
<string name="MediaPreviewActivity_unable_to_write_to_external_storage_without_permission">Nije moguće spremanje na vanjski medij bez dozvola</string>
|
||||
<string name="MediaPreviewActivity_media_delete_confirmation_title">Obriši poruku?</string>
|
||||
<string name="MediaPreviewActivity_media_delete_confirmation_message">Radnja će trajno izbrisati ovu poruku.</string>
|
||||
<!-- MessageNotifier -->
|
||||
<string name="MessageNotifier_d_new_messages_in_d_conversations">%1$d novih poruka u %2$d razgovora</string>
|
||||
<string name="MessageNotifier_most_recent_from_s">Najnovije od: %1$s</string>
|
||||
<string name="MessageNotifier_locked_message">Zaključana poruka</string>
|
||||
<string name="MessageNotifier_message_delivery_failed">Neuspješna isporuka poruke.</string>
|
||||
<string name="MessageNotifier_failed_to_deliver_message">Isporuka poruke nije uspjela.</string>
|
||||
<string name="MessageNotifier_error_delivering_message">Greška prilikom isporuke poruke.</string>
|
||||
<string name="MessageNotifier_mark_all_as_read">Označi sve kao pročitano</string>
|
||||
<string name="MessageNotifier_mark_read">Označi pročitano</string>
|
||||
<string name="MessageNotifier_reply">Odgovori</string>
|
||||
<string name="MessageNotifier_pending_signal_messages">Session poruke na čekanju</string>
|
||||
<string name="MessageNotifier_you_have_pending_signal_messages">Imate Session poruka na čekanju, pritisnite kako biste ih otvorili i preuzeli</string>
|
||||
<string name="MessageNotifier_contact_message">%1$s%2$s</string>
|
||||
<string name="MessageNotifier_unknown_contact_message">Kontakt</string>
|
||||
<!-- Notification Channels -->
|
||||
<string name="NotificationChannel_messages">Zadano</string>
|
||||
<string name="NotificationChannel_calls">Pozivi</string>
|
||||
<string name="NotificationChannel_failures">Neuspjesi</string>
|
||||
<string name="NotificationChannel_backups">Sigurnosne kopije</string>
|
||||
<string name="NotificationChannel_locked_status">Status zaključavanja</string>
|
||||
<string name="NotificationChannel_app_updates">Ažuriranja aplikacije</string>
|
||||
<string name="NotificationChannel_other">Ostalo</string>
|
||||
<string name="NotificationChannel_group_messages">Poruke</string>
|
||||
<string name="NotificationChannel_missing_display_name">Nepoznato</string>
|
||||
<!-- QuickResponseService -->
|
||||
<string name="QuickResponseService_quick_response_unavailable_when_Signal_is_locked">Brzi odgovor nije dostupan kada je Session zaključan!</string>
|
||||
<string name="QuickResponseService_problem_sending_message">Greška prilikom slanja poruke!</string>
|
||||
<!-- SaveAttachmentTask -->
|
||||
<string name="SaveAttachmentTask_saved_to">Spremljeno u %s</string>
|
||||
<string name="SaveAttachmentTask_saved">Spremljeno</string>
|
||||
<!-- SearchToolbar -->
|
||||
<string name="SearchToolbar_search">Traži</string>
|
||||
<!-- ShortcutLauncherActivity -->
|
||||
<string name="ShortcutLauncherActivity_invalid_shortcut">Nevažeći prečac</string>
|
||||
<!-- SingleRecipientNotificationBuilder -->
|
||||
<string name="SingleRecipientNotificationBuilder_signal">Session</string>
|
||||
<string name="SingleRecipientNotificationBuilder_new_message">Nova poruka</string>
|
||||
<!-- TransferControlView -->
|
||||
<plurals name="TransferControlView_n_items">
|
||||
<item quantity="one">%d Item</item>
|
||||
<item quantity="few">%d Items</item>
|
||||
<item quantity="many">%d Items</item>
|
||||
<item quantity="other">%d Items</item>
|
||||
</plurals>
|
||||
<!-- VideoPlayer -->
|
||||
<string name="VideoPlayer_error_playing_video">Greška pri video reprodukciji</string>
|
||||
<!-- attachment_type_selector -->
|
||||
<string name="attachment_type_selector__audio">Zvuk</string>
|
||||
<string name="attachment_type_selector__audio_description">Zvuk</string>
|
||||
<string name="attachment_type_selector__contact">Kontakt</string>
|
||||
<string name="attachment_type_selector__contact_description">Kontakt</string>
|
||||
<string name="attachment_type_selector__camera">Kamera</string>
|
||||
<string name="attachment_type_selector__camera_description">Kamera</string>
|
||||
<string name="attachment_type_selector__location">Položaj</string>
|
||||
<string name="attachment_type_selector__location_description">Položaj</string>
|
||||
<string name="attachment_type_selector__gif">GIF</string>
|
||||
<string name="attachment_type_selector__gif_description">Gif</string>
|
||||
<string name="attachment_type_selector__gallery_description">Slika ili video</string>
|
||||
<string name="attachment_type_selector__file_description">Datoteka</string>
|
||||
<string name="attachment_type_selector__gallery">Galerija</string>
|
||||
<string name="attachment_type_selector__file">Datoteka</string>
|
||||
<string name="attachment_type_selector__drawer_description">Uključi/isključi ladicu dodataka</string>
|
||||
<!-- contact_selection_group_activity -->
|
||||
<string name="contact_selection_group_activity__finding_contacts">Učitavanje kontakata...</string>
|
||||
<!-- conversation_activity -->
|
||||
<string name="conversation_activity__send">Pošalji</string>
|
||||
<string name="conversation_activity__compose_description">Sastavljanje poruke</string>
|
||||
<string name="conversation_activity__emoji_toggle_description">Uključi/isključi emoji tipkovnicu</string>
|
||||
<string name="conversation_activity__attachment_thumbnail">Priložena sličica</string>
|
||||
<string name="conversation_activity__quick_attachment_drawer_toggle_camera_description">Uključi/isključi ladicu brze kamere</string>
|
||||
<string name="conversation_activity__quick_attachment_drawer_record_and_send_audio_description">Snimi i pošalji audio privitak</string>
|
||||
<string name="conversation_activity__quick_attachment_drawer_lock_record_description">Lock recording of audio attachment</string>
|
||||
<string name="conversation_activity__enable_signal_for_sms">Omogući Session za SMS</string>
|
||||
<!-- conversation_input_panel -->
|
||||
<string name="conversation_input_panel__slide_to_cancel">Kliznite za otkazivanje</string>
|
||||
<string name="conversation_input_panel__cancel">Odustani</string>
|
||||
<!-- conversation_item -->
|
||||
<string name="conversation_item__mms_image_description">Multimedijalna poruka</string>
|
||||
<string name="conversation_item__secure_message_description">Sigurna poruka</string>
|
||||
<!-- conversation_item_sent -->
|
||||
<string name="conversation_item_sent__send_failed_indicator_description">Neuspješno slanje</string>
|
||||
<string name="conversation_item_sent__pending_approval_description">Odobrenje u tijeku</string>
|
||||
<string name="conversation_item_sent__delivered_description">Isporučeno</string>
|
||||
<string name="conversation_item_sent__message_read">Poruka pročitana</string>
|
||||
<!-- conversation_item_received -->
|
||||
<string name="conversation_item_received__contact_photo_description">Slika kontakta</string>
|
||||
<!-- audio_view -->
|
||||
<string name="audio_view__play_accessibility_description">Reprodukcija</string>
|
||||
<string name="audio_view__pause_accessibility_description">Zaustavi</string>
|
||||
<string name="audio_view__download_accessibility_description">Preuzmi</string>
|
||||
<!-- open_group_invitation_view -->
|
||||
<string name="open_group_invitation_view__join_accessibility_description">Join</string>
|
||||
<string name="open_group_invitation_view__open_group_invitation">Open group invitation</string>
|
||||
<!-- QuoteView -->
|
||||
<string name="QuoteView_audio">Zvuk</string>
|
||||
<string name="QuoteView_video">Video</string>
|
||||
<string name="QuoteView_photo">Fotografija</string>
|
||||
<string name="QuoteView_you">Vi</string>
|
||||
<string name="QuoteView_original_missing">Originalna poruka nije pronađena</string>
|
||||
<!-- conversation_fragment -->
|
||||
<string name="conversation_fragment__scroll_to_the_bottom_content_description">Kliži do dna</string>
|
||||
<!-- giphy_activity -->
|
||||
<string name="giphy_activity_toolbar__search_gifs_and_stickers">Pretraži GIFove i naljepnice</string>
|
||||
<!-- giphy_fragment -->
|
||||
<string name="giphy_fragment__nothing_found">Ništa nije pronađeno.</string>
|
||||
<!-- load_more_header -->
|
||||
<string name="load_more_header__see_full_conversation">Prikaži cijeli razgovor</string>
|
||||
<string name="load_more_header__loading">Učitavanje</string>
|
||||
<!-- media_overview_activity -->
|
||||
<string name="media_overview_activity__no_media">Bez medija</string>
|
||||
<!-- message_recipients_list_item -->
|
||||
<string name="message_recipients_list_item__resend">PONOVNO POŠALJI</string>
|
||||
<!-- recipient_preferences -->
|
||||
<string name="recipient_preferences__block">Blokiraj</string>
|
||||
<!-- message_details_header -->
|
||||
<string name="message_details_header__issues_need_your_attention">Neki problemi zahtjevaju vašu pozornost.</string>
|
||||
<string name="message_details_header__sent">Poslano</string>
|
||||
<string name="message_details_header__received">Primljeno</string>
|
||||
<string name="message_details_header__disappears">Nestaje</string>
|
||||
<string name="message_details_header__via">Putem</string>
|
||||
<string name="message_details_header__to">Prima:</string>
|
||||
<string name="message_details_header__from">Šalje:</string>
|
||||
<string name="message_details_header__with">Sa:</string>
|
||||
<!-- AndroidManifest.xml -->
|
||||
<string name="AndroidManifest__create_passphrase">Stvorite lozinku</string>
|
||||
<string name="AndroidManifest__select_contacts">Odaberite kontakte</string>
|
||||
<string name="AndroidManifest__media_preview">Prikaz medija</string>
|
||||
<!-- arrays.xml -->
|
||||
<string name="arrays__use_default">Koristi zadano</string>
|
||||
<string name="arrays__use_custom">Koristi prilagođeno</string>
|
||||
<string name="arrays__mute_for_one_hour">Utišaj na 1 sat</string>
|
||||
<string name="arrays__mute_for_two_hours">Utišaj na 2 sata</string>
|
||||
<string name="arrays__mute_for_one_day">Utišaj na 1 dan</string>
|
||||
<string name="arrays__mute_for_seven_days">Utišaj na 7 dana</string>
|
||||
<string name="arrays__mute_for_one_year">Utišaj na 1 godinu</string>
|
||||
<string name="arrays__settings_default">Zadane postavke</string>
|
||||
<string name="arrays__enabled">Omogućeno</string>
|
||||
<string name="arrays__disabled">Onemogućeno</string>
|
||||
<string name="arrays__name_and_message">Ime i poruka</string>
|
||||
<string name="arrays__name_only">Samo ime</string>
|
||||
<string name="arrays__no_name_or_message">Nema imena ili poruke</string>
|
||||
<string name="arrays__images">Slike</string>
|
||||
<string name="arrays__audio">Audio</string>
|
||||
<string name="arrays__video">Video</string>
|
||||
<string name="arrays__documents">Dokumenti</string>
|
||||
<string name="arrays__small">Mala</string>
|
||||
<string name="arrays__normal">Normalna</string>
|
||||
<string name="arrays__large">Velika</string>
|
||||
<string name="arrays__extra_large">Ekstra velika</string>
|
||||
<string name="arrays__default">Zadano</string>
|
||||
<string name="arrays__high">Visoko</string>
|
||||
<string name="arrays__max">Maks</string>
|
||||
<!-- plurals.xml -->
|
||||
<plurals name="hours_ago">
|
||||
<item quantity="one">%d sat</item>
|
||||
<item quantity="few">%d sata</item>
|
||||
<item quantity="many">%d sati</item>
|
||||
<item quantity="other">%d sati</item>
|
||||
</plurals>
|
||||
<!-- preferences.xml -->
|
||||
<string name="preferences__pref_enter_sends_title">Enter šalje poruku</string>
|
||||
<string name="preferences__pressing_the_enter_key_will_send_text_messages">Pritisak na Enter će poslati tekst poruku</string>
|
||||
<string name="preferences__send_link_previews">Send link previews</string>
|
||||
<string name="preferences__previews_are_supported_for">Previews are supported for Imgur, Instagram, Pinterest, Reddit, and YouTube links</string>
|
||||
<string name="preferences__screen_security">Sigurnost ekrana</string>
|
||||
<string name="preferences__disable_screen_security_to_allow_screen_shots">Onemogući snimanje ekrana na popisu nedavnih i unutar aplikacije</string>
|
||||
<string name="preferences__notifications">Obavijesti</string>
|
||||
<string name="preferences__led_color">LED boja</string>
|
||||
<string name="preferences__led_color_unknown">Nepoznato</string>
|
||||
<string name="preferences__pref_led_blink_title">LED uzorak treptanja</string>
|
||||
<string name="preferences__sound">Zvuk</string>
|
||||
<string name="preferences__silent">Bezvučno</string>
|
||||
<string name="preferences__repeat_alerts">Ponovi upozorenja</string>
|
||||
<string name="preferences__never">Nikada</string>
|
||||
<string name="preferences__one_time">Jednom</string>
|
||||
<string name="preferences__two_times">Dva puta</string>
|
||||
<string name="preferences__three_times">Tri puta</string>
|
||||
<string name="preferences__five_times">Pet puta</string>
|
||||
<string name="preferences__ten_times">Deset puta</string>
|
||||
<string name="preferences__vibrate">Vibracija</string>
|
||||
<string name="preferences__green">Zelena</string>
|
||||
<string name="preferences__red">Crvena</string>
|
||||
<string name="preferences__blue">Plava</string>
|
||||
<string name="preferences__orange">Narančasta</string>
|
||||
<string name="preferences__cyan">Cijan</string>
|
||||
<string name="preferences__magenta">Magenta</string>
|
||||
<string name="preferences__white">Bijela</string>
|
||||
<string name="preferences__none">Niti jedna</string>
|
||||
<string name="preferences__fast">Brzo</string>
|
||||
<string name="preferences__normal">Normalno</string>
|
||||
<string name="preferences__slow">Sporo</string>
|
||||
<string name="preferences__automatically_delete_older_messages_once_a_conversation_exceeds_a_specified_length">Automatski obriši starije poruke nakon što razgovor pređe određenu duljinu</string>
|
||||
<string name="preferences__delete_old_messages">Obriši stare poruke</string>
|
||||
<string name="preferences__conversation_length_limit">Maksimalna duljina razgovora</string>
|
||||
<string name="preferences__trim_all_conversations_now">Skrati sve razgovore odmah</string>
|
||||
<string name="preferences__scan_through_all_conversations_and_enforce_conversation_length_limits">Skeniraj sve razgovore i primijeni ograničenje duljine razgovora</string>
|
||||
<string name="preferences__default">Zadano</string>
|
||||
<string name="preferences__incognito_keyboard">Inkognito tipkovnica</string>
|
||||
<string name="preferences__read_receipts">Potvrde čitanja</string>
|
||||
<string name="preferences__if_read_receipts_are_disabled_you_wont_be_able_to_see_read_receipts">Ukoliko ste onemogućili potvrdu čitanja kod sebe, nećete moći vidjeti potvrde čitanja od drugih.</string>
|
||||
<string name="preferences__typing_indicators">Pokazatelji tipkanja</string>
|
||||
<string name="preferences__if_typing_indicators_are_disabled_you_wont_be_able_to_see_typing_indicators">If typing indicators are disabled, you won\'t be able to see typing indicators from others.</string>
|
||||
<string name="preferences__request_keyboard_to_disable_personalized_learning">Zahtijevaj od tipkovnice da onemogući personalizirano učenje</string>
|
||||
<string name="preferences__light_theme">Svijetla</string>
|
||||
<string name="preferences__dark_theme">Tamna</string>
|
||||
<string name="preferences_chats__message_trimming">Skraćivanje poruke</string>
|
||||
<string name="preferences_advanced__use_system_emoji">Koristi emotikone sustava</string>
|
||||
<string name="preferences_advanced__disable_signal_built_in_emoji_support">Onemogući ugrađenu Session podršku za emotikone</string>
|
||||
<string name="preferences_app_protection__app_access">Pristup aplikaciji</string>
|
||||
<string name="preferences_app_protection__communication">Komunikacija</string>
|
||||
<string name="preferences_chats__chats">Razgovori</string>
|
||||
<string name="preferences_notifications__messages">Poruke</string>
|
||||
<string name="preferences_notifications__in_chat_sounds">Zvuk unutar razgovora</string>
|
||||
<string name="preferences_notifications__show">Prikaži</string>
|
||||
<string name="preferences_notifications__priority">Prioritet</string>
|
||||
<!-- **************************************** -->
|
||||
<!-- menus -->
|
||||
<!-- **************************************** -->
|
||||
<!-- contact_selection_list -->
|
||||
<string name="contact_selection_list__unknown_contact">Nova poruka za...</string>
|
||||
<!-- conversation_context -->
|
||||
<string name="conversation_context__menu_message_details">Detalji poruke</string>
|
||||
<string name="conversation_context__menu_copy_text">Kopiraj tekst</string>
|
||||
<string name="conversation_context__menu_delete_message">Obriši poruku</string>
|
||||
<string name="conversation_context__menu_ban_user">Ban user</string>
|
||||
<string name="conversation_context__menu_resend_message">Ponovno pošalji poruku</string>
|
||||
<string name="conversation_context__menu_reply_to_message">Reply to message</string>
|
||||
<!-- conversation_context_image -->
|
||||
<string name="conversation_context_image__save_attachment">Spremi privitak</string>
|
||||
<!-- conversation_expiring_off -->
|
||||
<string name="conversation_expiring_off__disappearing_messages">Nestajuće poruke</string>
|
||||
<!-- conversation_expiring_on -->
|
||||
<string name="menu_conversation_expiring_on__messages_expiring">Poruke ističu</string>
|
||||
<!-- conversation_muted -->
|
||||
<string name="conversation_muted__unmute">Ukloni utišanje</string>
|
||||
<!-- conversation_unmuted -->
|
||||
<string name="conversation_unmuted__mute_notifications">Utišaj obavijesti</string>
|
||||
<!-- conversation -->
|
||||
<string name="conversation__menu_edit_group">Uredi grupu</string>
|
||||
<string name="conversation__menu_leave_group">Napusti grupu</string>
|
||||
<string name="conversation__menu_view_all_media">Svi mediji</string>
|
||||
<string name="conversation__menu_add_shortcut">Add to home screen</string>
|
||||
<!-- conversation_popup -->
|
||||
<string name="conversation_popup__menu_expand_popup">Proširi skočni prozor</string>
|
||||
<!-- conversation_group_options -->
|
||||
<string name="conversation_group_options__delivery">Isporuka</string>
|
||||
<string name="conversation_group_options__conversation">Razgovor</string>
|
||||
<string name="conversation_group_options__broadcast">Emitiranje</string>
|
||||
<!-- media_preview -->
|
||||
<string name="media_preview__save_title">Spremi</string>
|
||||
<string name="media_preview__forward_title">Naprijed</string>
|
||||
<string name="media_preview__all_media_title">Svi mediji</string>
|
||||
<!-- media_overview -->
|
||||
<string name="media_overview_documents_fragment__no_documents_found">Nema dokumenata</string>
|
||||
<!-- media_preview_activity -->
|
||||
<string name="media_preview_activity__media_content_description">Prikaz medija</string>
|
||||
<!-- Trimmer -->
|
||||
<string name="trimmer__deleting">Brisanje</string>
|
||||
<string name="trimmer__deleting_old_messages">Brisanje starih poruka...</string>
|
||||
<string name="trimmer__old_messages_successfully_deleted">Stare poruke su uspješno obrisane</string>
|
||||
<!-- transport_selection_list_item -->
|
||||
<string name="Permissions_permission_required">Permission required</string>
|
||||
<string name="Permissions_continue">Nastavi</string>
|
||||
<string name="Permissions_not_now">Not now</string>
|
||||
<string name="backup_enable_dialog__backups_will_be_saved_to_external_storage_and_encrypted_with_the_passphrase_below_you_must_have_this_passphrase_in_order_to_restore_a_backup">Backups will be saved to external storage and encrypted with the passphrase below. You must have this passphrase in order to restore a backup.</string>
|
||||
<string name="backup_enable_dialog__i_have_written_down_this_passphrase">I have written down this passphrase. Without it, I will be unable to restore a backup.</string>
|
||||
<string name="registration_activity__skip">Preskoči</string>
|
||||
<string name="RegistrationActivity_backup_failure_downgrade">Cannot import backups from newer versions of Session</string>
|
||||
<string name="RegistrationActivity_incorrect_backup_passphrase">Incorrect backup passphrase</string>
|
||||
<string name="BackupDialog_enable_local_backups">Enable local backups?</string>
|
||||
<string name="BackupDialog_enable_backups">Enable backups</string>
|
||||
<string name="BackupDialog_please_acknowledge_your_understanding_by_marking_the_confirmation_check_box">Please acknowledge your understanding by marking the confirmation check box.</string>
|
||||
<string name="BackupDialog_delete_backups">Delete backups?</string>
|
||||
<string name="BackupDialog_disable_and_delete_all_local_backups">Disable and delete all local backups?</string>
|
||||
<string name="BackupDialog_delete_backups_statement">Delete backups</string>
|
||||
<string name="BackupDialog_copied_to_clipboard">Kopirano u međuspremnik</string>
|
||||
<string name="LocalBackupJob_creating_backup">Stvaranje sigurnosne kopije...</string>
|
||||
<string name="ProgressPreference_d_messages_so_far">%d messages so far</string>
|
||||
<string name="BackupUtil_never">Nikada</string>
|
||||
<string name="preferences_app_protection__screen_lock">Screen lock</string>
|
||||
<string name="preferences_app_protection__lock_signal_access_with_android_screen_lock_or_fingerprint">Lock Session access with Android screen lock or fingerprint</string>
|
||||
<string name="preferences_app_protection__screen_lock_inactivity_timeout">Screen lock inactivity timeout</string>
|
||||
<string name="AppProtectionPreferenceFragment_none">Niti jedna</string>
|
||||
<!-- Conversation activity -->
|
||||
<string name="activity_conversation_copy_public_key_button_title">Copy public key</string>
|
||||
<!-- Session -->
|
||||
<string name="continue_2">Continue</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="invalid_url">Invalid URL</string>
|
||||
<string name="copied_to_clipboard">Copied to clipboard</string>
|
||||
<string name="next">Next</string>
|
||||
<string name="share">Share</string>
|
||||
<string name="invalid_session_id">Invalid Session ID</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="your_session_id">Your Session ID</string>
|
||||
<string name="activity_landing_title_2">Your Session begins here...</string>
|
||||
<string name="activity_landing_register_button_title">Create Session ID</string>
|
||||
<string name="activity_landing_restore_button_title">Continue Your Session</string>
|
||||
<string name="view_fake_chat_bubble_1">What\'s Session?</string>
|
||||
<string name="view_fake_chat_bubble_2">It\'s a decentralized, encrypted messaging app</string>
|
||||
<string name="view_fake_chat_bubble_3">So it doesn\'t collect my personal information or my conversation metadata? How does it work?</string>
|
||||
<string name="view_fake_chat_bubble_4">Using a combination of advanced anonymous routing and end-to-end encryption technologies.</string>
|
||||
<string name="view_fake_chat_bubble_5">Friends don\'t let friends use compromised messengers. You\'re welcome.</string>
|
||||
<string name="activity_register_title">Say hello to your Session ID</string>
|
||||
<string name="activity_register_explanation">Your Session ID is the unique address people can use to contact you on Session. With no connection to your real identity, your Session ID is totally anonymous and private by design.</string>
|
||||
<string name="activity_restore_title">Restore your account</string>
|
||||
<string name="activity_restore_explanation">Enter the recovery phrase that was given to you when you signed up to restore your account.</string>
|
||||
<string name="activity_restore_seed_edit_text_hint">Enter your recovery phrase</string>
|
||||
<string name="activity_display_name_title_2">Pick your display name</string>
|
||||
<string name="activity_display_name_explanation">This will be your name when you use Session. It can be your real name, an alias, or anything else you like.</string>
|
||||
<string name="activity_display_name_edit_text_hint">Enter a display name</string>
|
||||
<string name="activity_display_name_display_name_missing_error">Please pick a display name</string>
|
||||
<string name="activity_display_name_display_name_too_long_error">Please pick a shorter display name</string>
|
||||
<string name="activity_pn_mode_recommended_option_tag">Recommended</string>
|
||||
<string name="activity_pn_mode_no_option_picked_dialog_title">Please Pick an Option</string>
|
||||
<string name="activity_home_empty_state_message">You don\'t have any contacts yet</string>
|
||||
<string name="activity_home_empty_state_button_title">Start a Session</string>
|
||||
<string name="activity_home_leave_group_dialog_message">Are you sure you want to leave this group?</string>
|
||||
<string name="activity_home_leaving_group_failed_message">"Couldn't leave group"</string>
|
||||
<string name="activity_home_delete_conversation_dialog_message">Are you sure you want to delete this conversation?</string>
|
||||
<string name="activity_home_conversation_deleted_message">Conversation deleted</string>
|
||||
<string name="activity_seed_title">Your Recovery Phrase</string>
|
||||
<string name="activity_seed_title_2">Meet your recovery phrase</string>
|
||||
<string name="activity_seed_explanation">Your recovery phrase is the master key to your Session ID — you can use it to restore your Session ID if you lose access to your device. Store your recovery phrase in a safe place, and don\'t give it to anyone.</string>
|
||||
<string name="activity_seed_reveal_button_title">Hold to reveal</string>
|
||||
<string name="view_seed_reminder_subtitle_1">Secure your account by saving your recovery phrase</string>
|
||||
<string name="view_seed_reminder_subtitle_2">Tap and hold the redacted words to reveal your recovery phrase, then store it safely to secure your Session ID.</string>
|
||||
<string name="view_seed_reminder_subtitle_3">Make sure to store your recovery phrase in a safe place</string>
|
||||
<string name="activity_path_title">Path</string>
|
||||
<string name="activity_path_explanation">Session hides your IP by bouncing your messages through several Service Nodes in Session\'s decentralized network. These are the countries your connection is currently being bounced through:</string>
|
||||
<string name="activity_path_device_row_title">You</string>
|
||||
<string name="activity_path_guard_node_row_title">Entry Node</string>
|
||||
<string name="activity_path_service_node_row_title">Service Node</string>
|
||||
<string name="activity_path_destination_row_title">Destination</string>
|
||||
<string name="activity_path_learn_more_button_title">Learn More</string>
|
||||
<string name="activity_create_private_chat_title">New Session</string>
|
||||
<string name="activity_create_private_chat_enter_session_id_tab_title">Enter Session ID</string>
|
||||
<string name="activity_create_private_chat_scan_qr_code_tab_title">Scan QR Code</string>
|
||||
<string name="activity_create_private_chat_scan_qr_code_explanation">Scan a user\'s QR code to start a session. QR codes can be found by tapping the QR code icon in account settings.</string>
|
||||
<string name="fragment_enter_public_key_edit_text_hint">Enter Session ID of recipient</string>
|
||||
<string name="fragment_enter_public_key_explanation">Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code.</string>
|
||||
<string name="fragment_scan_qr_code_camera_access_explanation">Session needs camera access to scan QR codes</string>
|
||||
<string name="fragment_scan_qr_code_grant_camera_access_button_title">Grant Camera Access</string>
|
||||
<string name="activity_create_closed_group_title">New Closed Group</string>
|
||||
<string name="activity_create_closed_group_edit_text_hint">Enter a group name</string>
|
||||
<string name="activity_create_closed_group_empty_state_message">You don\'t have any contacts yet</string>
|
||||
<string name="activity_create_closed_group_empty_state_button_title">Start a Session</string>
|
||||
<string name="activity_create_closed_group_group_name_missing_error">Please enter a group name</string>
|
||||
<string name="activity_create_closed_group_group_name_too_long_error">Please enter a shorter group name</string>
|
||||
<string name="activity_create_closed_group_not_enough_group_members_error">Please pick at least 1 group member</string>
|
||||
<string name="activity_create_closed_group_too_many_group_members_error">A closed group cannot have more than 100 members</string>
|
||||
<string name="activity_join_public_chat_title">Join Open Group</string>
|
||||
<string name="activity_join_public_chat_error">Couldn\'t join group</string>
|
||||
<string name="activity_join_public_chat_enter_group_url_tab_title">Open Group URL</string>
|
||||
<string name="activity_join_public_chat_scan_qr_code_tab_title">Scan QR Code</string>
|
||||
<string name="activity_join_public_chat_scan_qr_code_explanation">Scan the QR code of the open group you\'d like to join</string>
|
||||
<string name="fragment_enter_chat_url_edit_text_hint">Enter an open group URL</string>
|
||||
<string name="activity_settings_title">Settings</string>
|
||||
<string name="activity_settings_display_name_edit_text_hint">Enter a display name</string>
|
||||
<string name="activity_settings_display_name_missing_error">Please pick a display name</string>
|
||||
<string name="activity_settings_display_name_too_long_error">Please pick a shorter display name</string>
|
||||
<string name="activity_settings_privacy_button_title">Privacy</string>
|
||||
<string name="activity_settings_notifications_button_title">Notifications</string>
|
||||
<string name="activity_settings_chats_button_title">Chats</string>
|
||||
<string name="activity_settings_devices_button_title">Devices</string>
|
||||
<string name="activity_settings_invite_button_title">Invite</string>
|
||||
<string name="activity_settings_recovery_phrase_button_title">Recovery Phrase</string>
|
||||
<string name="activity_settings_clear_all_data_button_title">Clear Data</string>
|
||||
<string name="activity_notification_settings_title">Notifications</string>
|
||||
<string name="activity_notification_settings_style_section_title">Notification Style</string>
|
||||
<string name="activity_notification_settings_content_section_title">Notification Content</string>
|
||||
<string name="activity_privacy_settings_title">Privacy</string>
|
||||
<string name="activity_chat_settings_title">Chats</string>
|
||||
<string name="preferences_notifications_strategy_category_title">Notification Strategy</string>
|
||||
<string name="fragment_device_list_bottom_sheet_change_name_button_title">Change name</string>
|
||||
<string name="fragment_device_list_bottom_sheet_unlink_device_button_title">Unlink device</string>
|
||||
<string name="dialog_seed_title">Your Recovery Phrase</string>
|
||||
<string name="dialog_seed_explanation">This is your recovery phrase. With it, you can restore or migrate your Session ID to a new device.</string>
|
||||
<string name="dialog_clear_all_data_title">Clear All Data</string>
|
||||
<string name="dialog_clear_all_data_explanation">This will permanently delete your messages, sessions, and contacts.</string>
|
||||
<string name="activity_qr_code_title">QR Code</string>
|
||||
<string name="activity_qr_code_view_my_qr_code_tab_title">View My QR Code</string>
|
||||
<string name="activity_qr_code_view_scan_qr_code_tab_title">Scan QR Code</string>
|
||||
<string name="activity_qr_code_view_scan_qr_code_explanation">Scan someone\'s QR code to start a conversation with them</string>
|
||||
<string name="fragment_view_my_qr_code_explanation">This is your QR code. Other users can scan it to start a session with you.</string>
|
||||
<string name="fragment_view_my_qr_code_share_title">Share QR Code</string>
|
||||
<string name="fragment_contact_selection_contacts_title">Contacts</string>
|
||||
<string name="fragment_contact_selection_closed_groups_title">Closed Groups</string>
|
||||
<string name="fragment_contact_selection_open_groups_title">Open Groups</string>
|
||||
<!-- Next round of translation -->
|
||||
<string name="menu_apply_button">Apply</string>
|
||||
<string name="menu_done_button">Done</string>
|
||||
<string name="activity_edit_closed_group_title">Edit Group</string>
|
||||
<string name="activity_edit_closed_group_edit_text_hint">Enter a new group name</string>
|
||||
<string name="activity_edit_closed_group_edit_members">Members</string>
|
||||
<string name="activity_edit_closed_group_add_members">Add members</string>
|
||||
<string name="activity_edit_closed_group_group_name_missing_error">Group name can\'t be empty</string>
|
||||
<string name="activity_edit_closed_group_group_name_too_long_error">Please enter a shorter group name</string>
|
||||
<string name="activity_edit_closed_group_not_enough_group_members_error">Groups must have at least 1 group member</string>
|
||||
<string name="fragment_edit_group_bottom_sheet_remove">Remove user from group</string>
|
||||
<string name="activity_select_contacts_title">Select Contacts</string>
|
||||
<string name="view_reset_secure_session_done_message">Secure session reset done</string>
|
||||
<string name="dialog_ui_mode_title">Theme</string>
|
||||
<string name="dialog_ui_mode_option_day">Day</string>
|
||||
<string name="dialog_ui_mode_option_night">Night</string>
|
||||
<string name="dialog_ui_mode_option_system_default">System default</string>
|
||||
<string name="activity_conversation_menu_copy_session_id">Copy Session ID</string>
|
||||
<string name="attachment">Attachment</string>
|
||||
<string name="attachment_type_voice_message">Voice Message</string>
|
||||
<string name="details">Details</string>
|
||||
<string name="dialog_backup_activation_failed">Failed to activate backups. Please try again or contact support.</string>
|
||||
<string name="activity_backup_restore_title">Restore backup</string>
|
||||
<string name="activity_backup_restore_select_file">Select a file</string>
|
||||
<string name="activity_backup_restore_explanation_1">Select a backup file and enter the passphrase it was created with.</string>
|
||||
<string name="activity_backup_restore_passphrase">30-digit passphrase</string>
|
||||
<!-- LinkDeviceActivity -->
|
||||
<string name="activity_link_device_skip_prompt">This is taking a while, would you like to skip?</string>
|
||||
<string name="activity_join_public_chat_join_rooms">Or join one of these…</string>
|
||||
</resources>
|
Reference in New Issue
Block a user