Skip to content

Commit

Permalink
Merge pull request #634 from stakwork/aa/feature/threading
Browse files Browse the repository at this point in the history
Threads last reply media implementation
  • Loading branch information
tomastiminskas authored Sep 21, 2023
2 parents 636ad1d + 1c99d7f commit 94a091b
Show file tree
Hide file tree
Showing 71 changed files with 2,442 additions and 811 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ buildscript {
classpath plugin.kotlin.gradle
classpath plugin.square.exhaustive
classpath plugin.square.sqlDelight
classpath plugin.kotlin.serialization
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
21 changes: 15 additions & 6 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ ext.deps = [
coroutinesCore: "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}",
reflect: "org.jetbrains.kotlin:kotlin-reflect:${versions.kotlin}",
],
kotlinx: [
serialization: "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2",
],
matthewNelson: [
toplService: "io.matthewnelson.topl-android:topl-service:${versions.toplAndroid}",
toplServiceBase: "io.matthewnelson.topl-android:topl-service-base:${versions.toplAndroid}",
Expand All @@ -122,22 +125,28 @@ ext.deps = [
],
viewBindingDelegateNoReflect: "com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.4.7",
giphy: [
sdk: "com.giphy.sdk:ui:2.1.2"
sdk: "com.giphy.sdk:ui:2.1.2"
],
jitsi: [
sdk: "org.jitsi.react:jitsi-meet-sdk:7.0.0"
sdk: "org.jitsi.react:jitsi-meet-sdk:7.0.0"
],
lottie: [
sdk: "com.airbnb.android:lottie:4.0.0"
sdk: "com.airbnb.android:lottie:4.0.0"
],
bip39: [
sdk: "cash.z.ecc.android:kotlin-bip39:${versions.bip39}"
sdk: "cash.z.ecc.android:kotlin-bip39:${versions.bip39}"
],
jna: [
sdk: "net.java.dev.jna:jna:5.8.0@aar"
],
facebook: [
shimmer: "com.facebook.shimmer:shimmer:0.5.0"
],
paho: [
sdk: "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0"
],
msgpack: [
sdk: "com.ensarsarajcic.kotlinx:serialization-msgpack:0.5.0"
]
]

Expand Down Expand Up @@ -173,7 +182,7 @@ ext.plugin = [
square: [
exhaustive: "app.cash.exhaustive:exhaustive-gradle:0.2.0",
sqlDelight: "com.squareup.sqldelight:gradle-plugin:${versions.sqlDelight}"
],
]
]

/**
Expand Down Expand Up @@ -225,5 +234,5 @@ ext.kaptDeps = [
],
square: [
moshiCodegen: "com.squareup.moshi:moshi-kotlin-codegen:${versions.moshi}",
],
]
]
5 changes: 5 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ include ':sphinx:activity:features:connectivity-helper'
include ':sphinx:activity:concepts:concept-view-model-coordinator'
include ':sphinx:activity:features:feature-view-model-coordinator'
include ':sphinx:activity:features:video-player-controller'
include ':sphinx:activity:concepts:concept-signer-manager'
include ':sphinx:activity:features:signer-manager'

// Screens
include ':sphinx:screens:add-sats:add-sats'
Expand Down Expand Up @@ -342,3 +344,6 @@ include ':sphinx:screens-detail:delete-podcast-detail:delete-podcast-detail'
include ':sphinx:screens-detail:delete-chat-media:delete-chat-media'
include ':sphinx:screens-detail:delete-chat-media-detail:delete-chat-media-detail'
include ':sphinx:screens:threads:threads'
include ':sphinx:activity:concepts:concept-signer-manager'
include ':sphinx:activity:features:signer-manager'
include ':sphinx:application:common:menus:menu-bottom-signer'
1 change: 1 addition & 0 deletions sphinx/activity/concepts/concept-signer-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
4 changes: 4 additions & 0 deletions sphinx/activity/concepts/concept-signer-manager/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id 'java-library'
id 'kotlin'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package chat.sphinx.concept_signer_manager

interface SignerCallback {
fun checkNetwork(callback: (Boolean) -> Unit)
fun signingDeviceNetwork(callback: (String) -> Unit)
fun signingDevicePassword(networkName: String, callback: (String) -> Unit)
fun signingDeviceLightningNodeUrl(callback: (String) -> Unit)
fun signingDeviceCheckBitcoinNetwork(network: (String) -> Unit, linkSigningDevice: (Boolean) -> Unit)
fun failedToSetupSigningDevice(message: String)
fun showMnemonicToUser(message: String, callback: (Boolean) -> Unit)
fun sendingSeedToHardware()
fun signingDeviceSuccessfullySet()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package chat.sphinx.concept_signer_manager

abstract class SignerManager {
abstract fun setupPhoneSigner()
abstract fun setupSignerHardware(signerCallback: SignerCallback)
abstract fun setWalletDataHandler(walletDataHandlerInstance: Any)
abstract fun setMoshi(moshiInstance: Any)
abstract fun setNetworkQueryCrypter(networkQueryCrypterInstance: Any)
}
1 change: 1 addition & 0 deletions sphinx/activity/features/signer-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
63 changes: 63 additions & 0 deletions sphinx/activity/features/signer-manager/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
plugins {
id 'app.cash.exhaustive'
id 'com.android.library'
id 'kotlin-android'
id 'kotlinx-serialization'
}

android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools

defaultConfig {
minSdkVersion versions.minSdk
targetSdkVersion versions.compileSdk
versionCode VERSION_CODE.toInteger()
versionName VERSION_NAME

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: 'true'
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
}
}
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
api project(path: ':kotlin:concepts:concept-coroutines')

implementation project(path: ':kotlin:encoders:base64')

// Sphinx
api project(path: ':sphinx:activity:concepts:concept-signer-manager')

implementation project(path: ':sphinx:screens-detail:common:detail-resources')
implementation project(path: ':sphinx:application:common:resources')
implementation project(path: ':sphinx:application:data:concepts:repositories:concept-repository-lightning')
implementation project(path: ':sphinx:application:data:concepts:concept-wallet')
implementation project(path: ':sphinx:application:common:wrappers:wrapper-message-media')

implementation project(path: ':sphinx:application:data:concepts:concept-background-login')
implementation project(path: ':sphinx:application:data:concepts:repositories:concept-repository-media')
implementation project(path: ':sphinx:application:data:concepts:repositories:concept-repository-contact')
implementation project(path: ':sphinx:application:network:concepts:queries:concept-network-query-crypter')
implementation project(path: ':sphinx:application:data:concepts:concept-relay')

implementation deps.jncryptor

implementation deps.androidx.lifecycle.hilt
implementation deps.bip39.sdk
implementation deps.jna.sdk
implementation deps.paho.sdk
implementation deps.kotlinx.serialization
implementation deps.msgpack.sdk
implementation deps.square.moshi


testImplementation project(path: ':kotlin:test:test-concept-coroutines')
}
Empty file.
21 changes: 21 additions & 0 deletions sphinx/activity/features/signer-manager/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="chat.sphinx.signer_manager"/>
Loading

0 comments on commit 94a091b

Please sign in to comment.