This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val whatsappRelay: BehaviorRelay<Boolean> = BehaviorRelay.create() | |
val telegramRelay: BehaviorRelay<Boolean> = BehaviorRelay.create() | |
val checkTextValid: BehaviorRelay<Boolean> = BehaviorRelay.create() | |
val openAppIntentRelay: BehaviorRelay<Intent> = BehaviorRelay.create() | |
val checkShowTextUnderSend: BehaviorRelay<Boolean> = BehaviorRelay.create() | |
val messageSent: BehaviorRelay<Boolean> = BehaviorRelay.create() | |
fun checkAppsInstalled() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun loadFavourites() { | |
compositeDisposable.add(viewModel.getFavouritesFromBackend() | |
.subscribe { | |
if (it.isEmpty()) { | |
showFavouritesEmpty() | |
} else { | |
updateFavouritesListener?.updateFavourites(it) | |
loadData(it) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class KeyStoreHelper { | |
private static final String ALIAS = "mikey"; | |
private static final String ANDROID_KEYSTORE = "AndroidKeyStore"; | |
private final Context context; | |
private Calendar start; | |
private Calendar end; | |
private KeyStore keyStore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interceptor addHeadersInterceptor = chain -> { | |
if (tokenInvalid){ | |
String token = getToken()); //If multiple call stays here blocked. | |
} | |
}; | |
public String getToken() { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"log" | |
"net/http" | |
"os" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"log" | |
"net/http" | |
"os" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
type User struct { | |
UserName string `json: "username" gorm: "primary_key; type:TEXT"` | |
Verified bool `json: "verified" gorm: "type : "BOOLEAN" ` | |
Password string `json: "password" gorm: "type: TEXT"` | |
Token string `json: "token" sql:"-" gorm:"-" ` | |
Podcasts []Podcast `json: "podcasts" gorm: "ForeignKey:UserEmail"` | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
type User struct { | |
UserName string `json: "username" gorm: "type:TEXT; primary_key; not null"` | |
Verified bool `json: "verified" gorm: "type : "BOOLEAN" ` | |
Password string `json: "password" gorm: "type: TEXT"` | |
Token string `json: "token" sql:"-" gorm:"-" ` | |
Podcasts []Podcast `json: "podcasts" gorm: "ForeignKey:UserEmail;AssociationForeignKey:UserName"` | |
} |