Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { ConversationListCustomView } from "../ConversationListCustomView";
import { ConversationListStyle } from "../";
import { ConversationListItemConfiguration } from "../../Shared";

/**
* @class ConversationListConfiguration
* @param {Number} limit
* @param {String} conversationType
* @param {false} userAndGroupTags
* @param {Array} tags
* @param {Boolean} loadingIconURL
* @param {Object} customView
* @param {false} hideError
* @param {false} enableSoundForMessages
* @param {String} customIncomingMessageSound
* @param {Object} style
* @param {Object} conversationListItemConfiguration
*/
class ConversationListConfiguration {
constructor({
limit = 30,
conversationType = "both",
userAndGroupTags = false,
tags = [],
loadingIconURL = "",
customView = new ConversationListCustomView({}),
hideError = false,
enableSoundForMessages = false,
customIncomingMessageSound = "",
style = new ConversationListStyle({}),
conversationListItemConfiguration = new ConversationListItemConfiguration(
{}
),
}) {
this.limit = limit;
this.conversationType = conversationType;
this.userAndGroupTags = userAndGroupTags;
this.tags = tags;
this.loadingIconURL = loadingIconURL;
this.customView = new ConversationListCustomView(customView ?? {});
this.hideError = hideError;
this.enableSoundForMessages = enableSoundForMessages;
this.customIncomingMessageSound = customIncomingMessageSound;
this.style = new ConversationListStyle(style ?? {});
this.conversationListItemConfiguration =
new ConversationListItemConfiguration(
conversationListItemConfiguration ?? {}
);
}
}

export { ConversationListConfiguration };
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* @class ConversationListStyle
* @description ConversationListStyle class is used for defining the styles for conversation list.
* @param {String} width
* @param {String} height
* @param {String} background
* @param {String} border
* @param {String} borderRadius
* @param {String} loadingIconTint
* @param {String} emptyStateTextFont
* @param {String} emptyStateTextColor
* @param {String} errorStateTextFont
* @param {String} errorStateTextColor
*/

class ConversationListStyle {
constructor({
width = "100%",
height = "100%",
background = "",
border = "",
borderRadius = "0",
loadingIconTint = "",
emptyStateTextFont = "",
emptyStateTextColor = "",
errorStateTextFont = "",
errorStateTextColor = "",
}) {
this.width = width;
this.height = height;
this.background = background;
this.border = border;
this.borderRadius = borderRadius;
this.loadingIconTint = loadingIconTint;
this.emptyStateTextFont = emptyStateTextFont;
this.emptyStateTextColor = emptyStateTextColor;
this.errorStateTextFont = errorStateTextFont;
this.errorStateTextColor = errorStateTextColor;
}
}
export { ConversationListStyle };

This file was deleted.

Loading