-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
42 changed files
with
874 additions
and
807 deletions.
There are no files selected for viewing
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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/br/org/cesar/discordtime/stickysessions/domain/model/ISessionDetail.java
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package br.org.cesar.discordtime.stickysessions.domain.model; | ||
|
||
import java.util.List; | ||
|
||
public interface ISessionDetail { | ||
String getId(); | ||
String getName(); | ||
List<String> getTopics(); | ||
String getCreatedAt(); | ||
} |
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
37 changes: 37 additions & 0 deletions
37
...br/org/cesar/discordtime/stickysessions/injectors/components/TopicNotesViewComponent.java
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package br.org.cesar.discordtime.stickysessions.injectors.components; | ||
|
||
import br.org.cesar.discordtime.stickysessions.injectors.modules.AuthModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.ContextModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.HttpLoggingInterceptorModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.HttpModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.HttpNetworkInterceptorModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.LoggerModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.NetworkModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.NoteModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.NoteTopicPresenterModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.ServerModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.SessionModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.ThreadModule; | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.UserModule; | ||
import br.org.cesar.discordtime.stickysessions.ui.notes.holder.NotesViewHolder; | ||
import dagger.Component; | ||
|
||
@Component( | ||
modules = { | ||
NoteTopicPresenterModule.class, | ||
NoteModule.class, | ||
SessionModule.class, | ||
ThreadModule.class, | ||
ContextModule.class, | ||
ServerModule.class, | ||
UserModule.class, | ||
LoggerModule.class, | ||
NetworkModule.class, | ||
HttpLoggingInterceptorModule.class, | ||
HttpNetworkInterceptorModule.class, | ||
HttpModule.class, | ||
AuthModule.class | ||
}) | ||
public interface TopicNotesViewComponent { | ||
void inject(NotesViewHolder view); | ||
} |
22 changes: 22 additions & 0 deletions
22
...a/br/org/cesar/discordtime/stickysessions/injectors/modules/NoteTopicPresenterModule.java
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package br.org.cesar.discordtime.stickysessions.injectors.modules; | ||
|
||
import java.util.List; | ||
|
||
import br.org.cesar.discordtime.stickysessions.domain.model.Note; | ||
import br.org.cesar.discordtime.stickysessions.domain.model.NoteFilter; | ||
import br.org.cesar.discordtime.stickysessions.executor.IObservableUseCase; | ||
import br.org.cesar.discordtime.stickysessions.presentation.notes.NotesContract; | ||
import br.org.cesar.discordtime.stickysessions.presentation.notes.NotesPresenter; | ||
import dagger.Module; | ||
import dagger.Provides; | ||
|
||
@Module | ||
public class NoteTopicPresenterModule { | ||
@Provides | ||
public NotesContract.Presenter getNoteTopicPresenter( | ||
IObservableUseCase<Note, Note> addNote, | ||
IObservableUseCase<Note, Boolean> removeNote, | ||
IObservableUseCase<NoteFilter, List<Note>> listNotes) { | ||
return new NotesPresenter(listNotes, addNote, removeNote); | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
.../main/java/br/org/cesar/discordtime/stickysessions/presentation/notes/INoteTopicDetail.kt
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package br.org.cesar.discordtime.stickysessions.presentation.notes | ||
|
||
interface INoteTopicDetail { | ||
fun getTopicName(): String? | ||
fun getUserId(): String? | ||
fun getSessionId(): String? | ||
} |
10 changes: 10 additions & 0 deletions
10
...c/main/java/br/org/cesar/discordtime/stickysessions/presentation/notes/NoteTopicDetail.kt
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package br.org.cesar.discordtime.stickysessions.presentation.notes | ||
|
||
class NoteTopicDetail( | ||
private val topicName: String?, | ||
private val sessionId: String?, | ||
private val userID: String?) : INoteTopicDetail { | ||
override fun getTopicName() = topicName | ||
override fun getSessionId() = sessionId | ||
override fun getUserId() = userID | ||
} |
20 changes: 20 additions & 0 deletions
20
...src/main/java/br/org/cesar/discordtime/stickysessions/presentation/notes/NotesContract.kt
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package br.org.cesar.discordtime.stickysessions.presentation.notes | ||
|
||
import br.org.cesar.discordtime.stickysessions.domain.model.Note | ||
|
||
interface NotesContract { | ||
interface Presenter { | ||
fun attachView(view: View) | ||
fun detachView() | ||
fun updateData(noteTopicDetail: INoteTopicDetail?) | ||
fun onNewNoteClick() | ||
} | ||
|
||
interface View { | ||
fun displayTopicName(name: String) | ||
fun displayNotes(notes: List<Note>) | ||
fun displayLoading() | ||
fun hideLoading() | ||
fun clearNotes() | ||
} | ||
} |
Oops, something went wrong.