Skip to content

Multiple accounts from and push#431

Merged
danieltigse merged 1 commit into
Criptext:multiple-accountsfrom
jorgeblacio:_multiple_accounts_from_and_push
Mar 22, 2019
Merged

Multiple accounts from and push#431
danieltigse merged 1 commit into
Criptext:multiple-accountsfrom
jorgeblacio:_multiple_accounts_from_and_push

Conversation

@jorgeblacio

Copy link
Copy Markdown
Collaborator

No description provided.

@jorgeblacio jorgeblacio requested a review from danieltigse March 22, 2019 15:58
@jorgeblacio jorgeblacio force-pushed the _multiple_accounts_from_and_push branch from 356234d to 61c6d92 Compare March 22, 2019 17:01
okAction.putExtra("randomId", pushData.randomId)
okAction.putExtra("deviceType", pushData.deviceType.ordinal)
okAction.putExtra("version", pushData.syncFileVersion)
okAction.putExtra(MessagingInstance.ACCOUNT, pushData.recipientId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use 'account'

okAction.putExtra("deviceName", pushData.deviceName)
okAction.putExtra("deviceType", pushData.deviceType.ordinal)
okAction.putExtra("version", pushData.syncFileVersion)
okAction.putExtra(MessagingInstance.ACCOUNT, pushData.recipientId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use 'account'

object Hosts {
const val restApiBaseUrl = "https://api.criptext.com"
const val webSocketBaseUrl = "wss://socket.criptext.com"
const val restApiBaseUrl = "https://stage.mail.criptext.com"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

companion object {

val mainDomain = "criptext.com"
val mainDomain = "jigl.com"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?


fun seed(contactDao: ContactDao){
contacts = contactDao.getAll(1)
contacts = contactDao.getAll()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the entire file

var activeAccount = ActiveAccount.loadFromStorage(storage)!!
val data = getIntentData(intent, activeAccount.recipientId)
val db = AppDatabase.getAppDatabase(this)
activeAccount = ActiveAccount.loadFromDB(db.accountDao().getAccountByRecipientId(data.recipientId)!!)!!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include a validation

.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val storage = KeyValueStorage.SharedPrefs(this)
val db = AppDatabase.getAppDatabase(this)
activeAccount = ActiveAccount.loadFromDB(db.accountDao().getAccountByRecipientId(data.recipientId)!!)!!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same validation here

var activeAccount = ActiveAccount.loadFromStorage(storage)!!
val data = getIntentData(intent, activeAccount.recipientId)
val db = AppDatabase.getAppDatabase(this)
activeAccount = ActiveAccount.loadFromDB(db.accountDao().getAccountByRecipientId(data.recipientId)!!)!!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

feedController.reloadFeeds()
dataSource.submitRequest(MailboxRequest.GetMenuInformation())
generalDataSource.submitRequest(GeneralRequest.TotalUnreadEmails(model.selectedLabel.text))
handleIntentExtras(resultData.extrasData)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the socket connection?

object EmailAddressUtils {

val CRIPTEXT_DOMAIN_SUFFIX = "@criptext.com"
val CRIPTEXT_DOMAIN_SUFFIX = "@jigl.com"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@jorgeblacio jorgeblacio force-pushed the _multiple_accounts_from_and_push branch from 61c6d92 to c2c37bb Compare March 22, 2019 20:26
@danieltigse danieltigse merged commit e899ebe into Criptext:multiple-accounts Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants