mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Add missing event
This commit is contained in:
parent
742d9bfa46
commit
c8a90ced19
@ -1568,7 +1568,7 @@
|
||||
<string name="activity_key_pair_register_or_restore_button_title_1">Register</string>
|
||||
<string name="activity_key_pair_register_or_restore_button_title_2">Restore</string>
|
||||
<string name="activity_key_pair_register_or_restore_button_title_3">Link</string>
|
||||
<string name="activity_key_pair_public_key_edit_text_label">Other Device Pub Key</string>
|
||||
<string name="activity_key_pair_public_key_edit_text_label">Your Public Key</string>
|
||||
<!-- Conversation list activity -->
|
||||
<string name="activity_conversation_list_empty_state_message">Looks like you don\'t have any conversations yet. Get started by messaging a friend.</string>
|
||||
<!-- Settings activity -->
|
||||
|
@ -147,7 +147,6 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
// LokiStorageAPI.Companion.setDebugMode(BuildConfig.DEBUG);
|
||||
LokiGroupChatAPI.Companion.setDebugMode(BuildConfig.DEBUG); // Loki - Set debug mode if needed
|
||||
startKovenant();
|
||||
Log.i(TAG, "onCreate()");
|
||||
|
@ -182,12 +182,10 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
|
||||
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PUBLIC_KEY));
|
||||
this.findPreference(PREFERENCE_CATEGORY_QR_CODE)
|
||||
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_QR_CODE));
|
||||
|
||||
Preference linkDevicePreference = this.findPreference(PREFERENCE_CATEGORY_LINK_DEVICE);
|
||||
// Hide if we're already a secondary device
|
||||
// Hide if this is a slave device
|
||||
linkDevicePreference.setVisible(!TextSecurePreferences.isSecondaryDevice(getContext()));
|
||||
linkDevicePreference.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_LINK_DEVICE));
|
||||
|
||||
this.findPreference(PREFERENCE_CATEGORY_SEED)
|
||||
.setOnPreferenceClickListener(new CategoryClickListener((PREFERENCE_CATEGORY_SEED)));
|
||||
|
||||
|
@ -86,21 +86,19 @@ public class TypingStatusSender {
|
||||
ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(context);
|
||||
Recipient originalRecipient = threadDatabase.getRecipientForThreadId(threadId);
|
||||
|
||||
// Send normal message if storage api wasn't found
|
||||
if (storageAPI == null || originalRecipient == null) {
|
||||
if (originalRecipient == null) {
|
||||
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(threadId, typingStarted));
|
||||
return;
|
||||
}
|
||||
|
||||
MultiDeviceUtilKt.getAllDevices(context, originalRecipient.getAddress().serialize(), storageAPI, (devicePubKey, isFriend, friendCount) -> {
|
||||
Recipient device = Recipient.from(context, Address.fromSerialized(devicePubKey), false);
|
||||
long deviceThreadId = threadDatabase.getThreadIdIfExistsFor(device);
|
||||
if (deviceThreadId > -1) {
|
||||
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(deviceThreadId, typingStarted));
|
||||
MultiDeviceUtilKt.getAllDevices(context, originalRecipient.getAddress().serialize(), storageAPI, (devicePublicKey, isFriend, friendCount) -> {
|
||||
Recipient device = Recipient.from(context, Address.fromSerialized(devicePublicKey), false);
|
||||
long deviceThreadID = threadDatabase.getThreadIdIfExistsFor(device);
|
||||
if (deviceThreadID > -1) {
|
||||
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(deviceThreadID, typingStarted));
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private class StartRunnable implements Runnable {
|
||||
|
@ -19,14 +19,14 @@ fun <T> SQLiteDatabase.get(table: String, query: String, arguments: Array<String
|
||||
}
|
||||
|
||||
fun <T> SQLiteDatabase.getAll(table: String, query: String, arguments: Array<String>, get: (Cursor) -> T): List<T> {
|
||||
var list = mutableListOf<T>()
|
||||
val result = mutableListOf<T>()
|
||||
var cursor: Cursor? = null
|
||||
try {
|
||||
cursor = query(table, null, query, arguments, null, null, null)
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
list.add(get(cursor))
|
||||
result.add(get(cursor))
|
||||
}
|
||||
return list
|
||||
return result
|
||||
} catch (e: Exception) {
|
||||
// Do nothing
|
||||
} finally {
|
||||
|
@ -221,6 +221,7 @@ class SeedActivity : BaseActionBarActivity() {
|
||||
// Show the dialog
|
||||
val dialog = DeviceLinkingDialog.show(this, DeviceLinkingView.Mode.Slave, object: DeviceLinkingDialogDelegate {
|
||||
override fun handleDeviceLinkAuthorized() {
|
||||
Analytics.shared.track("Device Linked Successfully")
|
||||
showAccountDetailsView()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user