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_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_2">Restore</string>
|
||||||
<string name="activity_key_pair_register_or_restore_button_title_3">Link</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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Settings activity -->
|
||||||
|
@ -147,7 +147,6 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
// LokiStorageAPI.Companion.setDebugMode(BuildConfig.DEBUG);
|
|
||||||
LokiGroupChatAPI.Companion.setDebugMode(BuildConfig.DEBUG); // Loki - Set debug mode if needed
|
LokiGroupChatAPI.Companion.setDebugMode(BuildConfig.DEBUG); // Loki - Set debug mode if needed
|
||||||
startKovenant();
|
startKovenant();
|
||||||
Log.i(TAG, "onCreate()");
|
Log.i(TAG, "onCreate()");
|
||||||
|
@ -182,12 +182,10 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
|
|||||||
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PUBLIC_KEY));
|
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PUBLIC_KEY));
|
||||||
this.findPreference(PREFERENCE_CATEGORY_QR_CODE)
|
this.findPreference(PREFERENCE_CATEGORY_QR_CODE)
|
||||||
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_QR_CODE));
|
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_QR_CODE));
|
||||||
|
|
||||||
Preference linkDevicePreference = this.findPreference(PREFERENCE_CATEGORY_LINK_DEVICE);
|
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.setVisible(!TextSecurePreferences.isSecondaryDevice(getContext()));
|
||||||
linkDevicePreference.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_LINK_DEVICE));
|
linkDevicePreference.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_LINK_DEVICE));
|
||||||
|
|
||||||
this.findPreference(PREFERENCE_CATEGORY_SEED)
|
this.findPreference(PREFERENCE_CATEGORY_SEED)
|
||||||
.setOnPreferenceClickListener(new CategoryClickListener((PREFERENCE_CATEGORY_SEED)));
|
.setOnPreferenceClickListener(new CategoryClickListener((PREFERENCE_CATEGORY_SEED)));
|
||||||
|
|
||||||
|
@ -86,21 +86,19 @@ public class TypingStatusSender {
|
|||||||
ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(context);
|
ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(context);
|
||||||
Recipient originalRecipient = threadDatabase.getRecipientForThreadId(threadId);
|
Recipient originalRecipient = threadDatabase.getRecipientForThreadId(threadId);
|
||||||
|
|
||||||
// Send normal message if storage api wasn't found
|
if (originalRecipient == null) {
|
||||||
if (storageAPI == null || originalRecipient == null) {
|
|
||||||
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(threadId, typingStarted));
|
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(threadId, typingStarted));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiDeviceUtilKt.getAllDevices(context, originalRecipient.getAddress().serialize(), storageAPI, (devicePubKey, isFriend, friendCount) -> {
|
MultiDeviceUtilKt.getAllDevices(context, originalRecipient.getAddress().serialize(), storageAPI, (devicePublicKey, isFriend, friendCount) -> {
|
||||||
Recipient device = Recipient.from(context, Address.fromSerialized(devicePubKey), false);
|
Recipient device = Recipient.from(context, Address.fromSerialized(devicePublicKey), false);
|
||||||
long deviceThreadId = threadDatabase.getThreadIdIfExistsFor(device);
|
long deviceThreadID = threadDatabase.getThreadIdIfExistsFor(device);
|
||||||
if (deviceThreadId > -1) {
|
if (deviceThreadID > -1) {
|
||||||
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(deviceThreadId, typingStarted));
|
ApplicationContext.getInstance(context).getJobManager().add(new TypingSendJob(deviceThreadID, typingStarted));
|
||||||
}
|
}
|
||||||
return Unit.INSTANCE;
|
return Unit.INSTANCE;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class StartRunnable implements Runnable {
|
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> {
|
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
|
var cursor: Cursor? = null
|
||||||
try {
|
try {
|
||||||
cursor = query(table, null, query, arguments, null, null, null)
|
cursor = query(table, null, query, arguments, null, null, null)
|
||||||
while (cursor != null && cursor.moveToNext()) {
|
while (cursor != null && cursor.moveToNext()) {
|
||||||
list.add(get(cursor))
|
result.add(get(cursor))
|
||||||
}
|
}
|
||||||
return list
|
return result
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -221,6 +221,7 @@ class SeedActivity : BaseActionBarActivity() {
|
|||||||
// Show the dialog
|
// Show the dialog
|
||||||
val dialog = DeviceLinkingDialog.show(this, DeviceLinkingView.Mode.Slave, object: DeviceLinkingDialogDelegate {
|
val dialog = DeviceLinkingDialog.show(this, DeviceLinkingView.Mode.Slave, object: DeviceLinkingDialogDelegate {
|
||||||
override fun handleDeviceLinkAuthorized() {
|
override fun handleDeviceLinkAuthorized() {
|
||||||
|
Analytics.shared.track("Device Linked Successfully")
|
||||||
showAccountDetailsView()
|
showAccountDetailsView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user