Reference Source
public class | source

AlertPresenter

Extends:

* → AlertPresenter

Class for the Home presenter and view

Constructor Summary

Public Constructor
public

Creates an instance of AlertPresenter

Member Summary

Public Members
public

Forces a refresh for the view by recalcuating the timeago property, resorting bookmarked data and setting the state again.

public

Gets the data from the model and returns it to the caller.

public

getProfileImage(callback: Function): *

Gets the profile image from the ProfileModel.

public

Handle the search cancel.

public

Handle the search clear

public

Filter the items in the list based on the text passed in.

public

If the view or presenter is destroyed, unsubscribe the presenter from the model.

public

onUpdated(newData: Object): *

Called when the model is updated with new data.

public

update(newData: Object): *

Updates the bike model with new data.

public

view: *

Public Constructors

public constructor(view: Object) source

Creates an instance of AlertPresenter

Params:

NameTypeAttributeDescription
view Object

An instance of a view class

Public Members

public forceRefresh: * source

Forces a refresh for the view by recalcuating the timeago property, resorting bookmarked data and setting the state again.

public getData: Object: * source

Gets the data from the model and returns it to the caller.

Return:

Object

Data from the model.

public getProfileImage(callback: Function): * source

Gets the profile image from the ProfileModel.

public handleSearchCancel: * source

Handle the search cancel.

public handleSearchClear: * source

Handle the search clear

public handleSearchFilter(text: string): * source

Filter the items in the list based on the text passed in. Called every time a letter is typed.

public onDestroy: * source

If the view or presenter is destroyed, unsubscribe the presenter from the model.

public onUpdated(newData: Object): * source

Called when the model is updated with new data. Refreshes the state of the view. Method is supplied with the data to add. Better way to refresh the state?

public update(newData: Object): * source

Updates the bike model with new data.

public view: * source