File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
libraries/sdk/src/main/java/com/fastcomments/sdk Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,18 @@ protected void onCreate(Bundle savedInstanceState) {
120120 FastCommentsSDK commentsSDK = feedSDK .createCommentsSDKForPost (post );
121121 commentsView = new FastCommentsView (getContext (), commentsSDK );
122122
123+ // Apply theme colors to dialog header if theme is available
124+ if (feedSDK .getTheme () != null ) {
125+ FrameLayout headerContainer = findViewById (R .id .headerContainer );
126+ headerContainer .setBackgroundColor (
127+ ThemeColorResolver .getDialogHeaderBackgroundColor (getContext (), feedSDK .getTheme ())
128+ );
129+
130+ titleTextView .setTextColor (
131+ ThemeColorResolver .getDialogHeaderTextColor (getContext (), feedSDK .getTheme ())
132+ );
133+ }
134+
123135 // Set user click listener if one was provided
124136 if (userClickListener != null ) {
125137 commentsView .setOnUserClickListener (userClickListener );
Original file line number Diff line number Diff line change @@ -699,7 +699,14 @@ public FastCommentsSDK createCommentsSDKForPost(FeedPost post) {
699699 }
700700
701701 // Create a new FastCommentsSDK with this config
702- return new FastCommentsSDK (config );
702+ FastCommentsSDK commentsSDK = new FastCommentsSDK (config );
703+
704+ // Pass the theme from the feed SDK to the comments SDK
705+ if (this .theme != null ) {
706+ commentsSDK .setTheme (this .theme );
707+ }
708+
709+ return commentsSDK ;
703710 }
704711
705712
You can’t perform that action at this time.
0 commit comments