Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

room sender color interceptor #41

Merged
merged 5 commits into from Jan 15, 2018

Conversation

andhikayuana
Copy link
Contributor

@andhikayuana andhikayuana commented Jan 10, 2018

to intercept sender color name
example

Qiscus.getChatConfig().setRoomSenderNameColorInterceptor(qiscusComment -> R.color.accent);

//or you can set the logic inside

Qiscus.getChatConfig().setRoomSenderNameColorInterceptor(qiscusComment -> {
            if (anu) {
                return R.color.colorAnu;
            } else if (anu2) {
                return R.color.colorAnu2;
            } else {
                return R.color.colorAnu3;
            }
        });

//replybar color
Qiscus.getChatConfig()
                .setRoomReplybarColorInterceptor(qiscusComment -> R.color.qiscus_contact_background);

//clear chats
ArrayList<String> strings = new ArrayList<>();
        strings.add("uniqueid");

        QiscusApi.getInstance()
                .clearChatRoomMessages(strings)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(aVoid -> Toast.makeText(MainActivity.this, "Berhasil", Toast.LENGTH_SHORT).show(), Throwable::printStackTrace);

@zetbaitsu
Copy link
Contributor

bro @andhikayuana please fix the checkstyle issues first

@andhikayuana
Copy link
Contributor Author

ok wait

@codecov
Copy link

codecov bot commented Jan 12, 2018

Codecov Report

Merging #41 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #41   +/-   ##
======================================
  Coverage       0%      0%           
======================================
  Files         127     127           
  Lines       10091   10128   +37     
  Branches     1043    1044    +1     
======================================
- Misses      10091   10128   +37
Impacted Files Coverage Δ
...r/viewholder/QiscusBaseReplyMessageViewHolder.java 0% <0%> (ø) ⬆️
...dapter/viewholder/QiscusBaseMessageViewHolder.java 0% <0%> (ø) ⬆️
...va/com/qiscus/sdk/data/model/QiscusChatConfig.java 0% <0%> (ø) ⬆️
...com/qiscus/sdk/ui/view/QiscusReplyPreviewView.java 0% <0%> (ø) ⬆️
...ain/java/com/qiscus/sdk/data/remote/QiscusApi.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61490ca...7b66c20. Read the comment docs.

@zetbaitsu zetbaitsu merged commit c958159 into qiscus:master Jan 15, 2018
@andhikayuana andhikayuana deleted the feature/color-sender-name branch February 20, 2018 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants