-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed using ContactsDao.getAllContactsWithPgpLD().| #1188
- Loading branch information
Showing
10 changed files
with
1,060 additions
and
63 deletions.
There are no files selected for viewing
997 changes: 997 additions & 0 deletions
997
FlowCrypt/schemas/com.flowcrypt.email.database.FlowCryptRoomDatabase/27.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
package com.flowcrypt.email.ui.activity | ||
|
||
import android.app.Activity | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.os.Bundle | ||
|
@@ -22,7 +23,6 @@ import androidx.test.espresso.idling.CountingIdlingResource | |
import com.flowcrypt.email.R | ||
import com.flowcrypt.email.api.retrofit.response.base.Result | ||
import com.flowcrypt.email.database.entity.ContactEntity | ||
import com.flowcrypt.email.database.entity.relation.RecipientWithPubKeys | ||
import com.flowcrypt.email.extensions.decrementSafely | ||
import com.flowcrypt.email.extensions.incrementSafely | ||
import com.flowcrypt.email.jetpack.viewmodel.ContactsViewModel | ||
|
@@ -41,7 +41,7 @@ import com.flowcrypt.email.util.UIUtil | |
* E-mail: [email protected] | ||
*/ | ||
class SelectContactsActivity : BaseBackStackActivity(), | ||
ContactsRecyclerViewAdapter.OnContactClickListener, SearchView.OnQueryTextListener { | ||
ContactsRecyclerViewAdapter.OnContactActionsListener, SearchView.OnQueryTextListener { | ||
|
||
private var progressBar: View? = null | ||
private var recyclerViewContacts: RecyclerView? = null | ||
|
@@ -65,7 +65,7 @@ class SelectContactsActivity : BaseBackStackActivity(), | |
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
contactsRecyclerViewAdapter.onContactClickListener = this | ||
contactsRecyclerViewAdapter.onContactActionsListener = this | ||
//todo-denbond7 need to fix this in the future. Not urgent | ||
//val isMultiply = intent.getBooleanExtra(KEY_EXTRA_IS_MULTIPLY, false) | ||
|
||
|
@@ -108,12 +108,14 @@ class SelectContactsActivity : BaseBackStackActivity(), | |
return super.onPrepareOptionsMenu(menu) | ||
} | ||
|
||
/*override fun onContactClick(contactEntity: ContactEntity) { | ||
override fun onContactClick(contactEntity: ContactEntity) { | ||
val intent = Intent() | ||
intent.putExtra(KEY_EXTRA_PGP_CONTACT, contactEntity) | ||
setResult(Activity.RESULT_OK, intent) | ||
finish() | ||
}*/ | ||
} | ||
|
||
override fun onDeleteContact(contactEntity: ContactEntity) {} | ||
|
||
override fun onQueryTextSubmit(query: String): Boolean { | ||
searchPattern = query | ||
|
@@ -180,8 +182,4 @@ class SelectContactsActivity : BaseBackStackActivity(), | |
return intent | ||
} | ||
} | ||
|
||
override fun onContactClick(contactWithPubKeys: RecipientWithPubKeys) { | ||
TODO("Not yet implemented") | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,8 @@ import androidx.recyclerview.widget.LinearLayoutManager | |
import androidx.recyclerview.widget.RecyclerView | ||
import com.flowcrypt.email.R | ||
import com.flowcrypt.email.api.retrofit.response.base.Result | ||
import com.flowcrypt.email.database.entity.relation.RecipientWithPubKeys | ||
import com.flowcrypt.email.database.entity.ContactEntity | ||
import com.flowcrypt.email.extensions.navController | ||
import com.flowcrypt.email.jetpack.viewmodel.ContactsViewModel | ||
import com.flowcrypt.email.ui.activity.ImportPgpContactActivity | ||
import com.flowcrypt.email.ui.activity.fragment.base.BaseFragment | ||
|
@@ -32,8 +33,7 @@ import com.flowcrypt.email.util.UIUtil | |
* Time: 6:11 PM | ||
* E-mail: [email protected] | ||
*/ | ||
class ContactsListFragment : BaseFragment(), ContactsRecyclerViewAdapter.OnDeleteContactListener, | ||
ContactsRecyclerViewAdapter.OnContactClickListener { | ||
class ContactsListFragment : BaseFragment(), ContactsRecyclerViewAdapter.OnContactActionsListener { | ||
|
||
private var progressBar: View? = null | ||
private var recyclerViewContacts: RecyclerView? = null | ||
|
@@ -46,8 +46,7 @@ class ContactsListFragment : BaseFragment(), ContactsRecyclerViewAdapter.OnDelet | |
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
contactsRecyclerViewAdapter.onDeleteContactListener = this | ||
contactsRecyclerViewAdapter.onContactClickListener = this | ||
contactsRecyclerViewAdapter.onContactActionsListener = this | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
|
@@ -71,20 +70,20 @@ class ContactsListFragment : BaseFragment(), ContactsRecyclerViewAdapter.OnDelet | |
} | ||
} | ||
|
||
/*override fun onContactClick(contactEntity: ContactEntity) { | ||
override fun onContactClick(contactEntity: ContactEntity) { | ||
navController?.navigate( | ||
ContactsListFragmentDirections | ||
.actionContactsListFragmentToPublicKeyDetailsFragment(contactEntity) | ||
) | ||
}*/ | ||
} | ||
|
||
/*override fun onDeleteContact(contactEntity: ContactEntity) { | ||
override fun onDeleteContact(contactEntity: ContactEntity) { | ||
contactsViewModel.deleteContact(contactEntity) | ||
Toast.makeText( | ||
context, getString(R.string.the_contact_was_deleted, contactEntity.email), | ||
Toast.LENGTH_SHORT | ||
).show() | ||
}*/ | ||
} | ||
|
||
private fun initViews(root: View) { | ||
this.progressBar = root.findViewById(R.id.progressBar) | ||
|
@@ -122,7 +121,7 @@ class ContactsListFragment : BaseFragment(), ContactsRecyclerViewAdapter.OnDelet | |
if (it.data.isNullOrEmpty()) { | ||
UIUtil.exchangeViewVisibility(true, emptyView, recyclerViewContacts) | ||
} else { | ||
//contactsRecyclerViewAdapter.swap(it.data) | ||
contactsRecyclerViewAdapter.swap(it.data) | ||
UIUtil.exchangeViewVisibility(false, emptyView, recyclerViewContacts) | ||
} | ||
} | ||
|
@@ -136,12 +135,4 @@ class ContactsListFragment : BaseFragment(), ContactsRecyclerViewAdapter.OnDelet | |
companion object { | ||
private const val REQUEST_CODE_START_IMPORT_PUB_KEY_ACTIVITY = 0 | ||
} | ||
|
||
override fun onContactClick(contactWithPubKeys: RecipientWithPubKeys) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun onDeleteContact(contactWithPubKeys: RecipientWithPubKeys) { | ||
TODO("Not yet implemented") | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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