Skip to content

Commit

Permalink
Refactored code. Removed temporary files.| #793
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed Dec 17, 2019
1 parent d692783 commit 68b6f6b
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 237 deletions.
3 changes: 0 additions & 3 deletions FlowCrypt/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@
android:name=".ui.activity.UserRecoverableAuthExceptionActivity"
android:launchMode="singleTask" />

<activity android:name=".ui.activity.ui.paging.PagingActivity" />


<!-- Providers -->
<provider
android:name=".database.provider.SecurityContentProvider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
* Contributors: DenBond7
*/

package com.flowcrypt.email.ui.activity.ui.paging
package com.flowcrypt.email.jetpack.viewmodel

import android.app.Application
import androidx.lifecycle.LiveData
import androidx.paging.PagedList
import androidx.paging.toLiveData
import com.flowcrypt.email.database.FlowCryptRoomDatabase
import com.flowcrypt.email.database.entity.MessageEntity
import com.flowcrypt.email.jetpack.viewmodel.BaseAndroidViewModel

class PagingViewModel(application: Application) : BaseAndroidViewModel(application) {
/**
* @author Denis Bondarenko
* Date: 12/17/19
* Time: 4:37 PM
* E-mail: [email protected]
*/
class MessagesViewModel(application: Application) : BaseAndroidViewModel(application) {
private val roomDatabase = FlowCryptRoomDatabase.getDatabase(application)
val concertList: LiveData<PagedList<MessageEntity>> = roomDatabase.msgDao().msgs().toLiveData(pageSize = 20)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class EmailManagerActivity : BaseEmailListActivity(), NavigationView.OnNavigatio
val fragment = supportFragmentManager
.findFragmentById(R.id.emailListFragment) as EmailListFragment?

fragment?.onForceLoadNewMsgsCompleted(refreshListNeeded)
//fragment?.onForceLoadNewMsgsCompleted(refreshListNeeded)
}

/**
Expand Down
Loading

0 comments on commit 68b6f6b

Please sign in to comment.