Search in sources :

Example 1 with IEditCategoryView

use of com.yydcdut.note.views.setting.IEditCategoryView in project PhotoNoter by yydcdut.

the class EditCategoryPresenterImpl method attachView.

@Override
public void attachView(IView iView) {
    mHandler = new Handler(this);
    mDeleteCategoryIdList = new ArrayList<>();
    mRenameCategoryLabelMap = new HashMap<>();
    mEditCategoryView = (IEditCategoryView) iView;
    mRxCategory.getAllCategories().observeOn(AndroidSchedulers.mainThread()).subscribe(categories -> mEditCategoryView.showCategoryList(categories), (throwable -> YLog.e(throwable)));
}
Also used : Context(android.content.Context) RxPhotoNote(com.yydcdut.note.model.rx.RxPhotoNote) AndroidSchedulers(rx.android.schedulers.AndroidSchedulers) HashMap(java.util.HashMap) IEditCategoryPresenter(com.yydcdut.note.presenters.setting.IEditCategoryPresenter) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Handler(android.os.Handler) ContextLife(com.yydcdut.note.injector.ContextLife) EventBus(org.greenrobot.eventbus.EventBus) Map(java.util.Map) Category(com.yydcdut.note.entity.Category) FilePathUtils(com.yydcdut.note.utils.FilePathUtils) Schedulers(rx.schedulers.Schedulers) R(com.yydcdut.note.R) RxCategory(com.yydcdut.note.model.rx.RxCategory) Iterator(java.util.Iterator) CategoryEditEvent(com.yydcdut.note.bus.CategoryEditEvent) IEditCategoryView(com.yydcdut.note.views.setting.IEditCategoryView) List(java.util.List) Message(android.os.Message) ComparatorFactory(com.yydcdut.note.model.compare.ComparatorFactory) CategoryDeleteEvent(com.yydcdut.note.bus.CategoryDeleteEvent) PhotoNote(com.yydcdut.note.entity.PhotoNote) YLog(com.yydcdut.note.utils.YLog) IView(com.yydcdut.note.views.IView) Handler(android.os.Handler)

Aggregations

Context (android.content.Context)1 Handler (android.os.Handler)1 Message (android.os.Message)1 R (com.yydcdut.note.R)1 CategoryDeleteEvent (com.yydcdut.note.bus.CategoryDeleteEvent)1 CategoryEditEvent (com.yydcdut.note.bus.CategoryEditEvent)1 Category (com.yydcdut.note.entity.Category)1 PhotoNote (com.yydcdut.note.entity.PhotoNote)1 ContextLife (com.yydcdut.note.injector.ContextLife)1 ComparatorFactory (com.yydcdut.note.model.compare.ComparatorFactory)1 RxCategory (com.yydcdut.note.model.rx.RxCategory)1 RxPhotoNote (com.yydcdut.note.model.rx.RxPhotoNote)1 IEditCategoryPresenter (com.yydcdut.note.presenters.setting.IEditCategoryPresenter)1 FilePathUtils (com.yydcdut.note.utils.FilePathUtils)1 YLog (com.yydcdut.note.utils.YLog)1 IView (com.yydcdut.note.views.IView)1 IEditCategoryView (com.yydcdut.note.views.setting.IEditCategoryView)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1