Messaging UI Settings - Texts, Localization, Colors and Features
MesiboUiConfig holds every setting of the messaging UI: texts, colors, images, and which features
are on. The settings are in groups, one group per screen or part of the UI. The names are the same
on Android, iOS and Flutter.
The settings of each part of the UI are described on these pages:
| Page | Settings |
|---|---|
| Themes and Colors | colors, light and dark themes, text size, wallpaper, customizations, the Customize screen |
| Chat List | title, search, filters, archived chats, swipe actions |
| Chat Screen | message features, attachments, photo editor, picture size, message options, disappearing messages, message status, message info, photo and video viewer |
| Profiles | the profile screen, profile photos, profile media |
| Privacy and Security | end-to-end encryption screens, sensitive messages |
| Configuration as JSON | the settings as JSON: applying, exporting, the JSON Schema |
| Setting Names | the new name of every setting of earlier versions |
Setting the configuration
The app sets the configuration in two ways:
- In code, in
MesiboUI_onConfigof the app’sMesiboUIListener. mesibo calls it each time it makes a new configuration, for example when the theme changes. See Light and dark theme. - As a customization: a JSON of settings saved with
saveCustomization, for example from the Customize screen or from the app’s server. See Customizations.
@Override
public void MesiboUI_onConfig(MesiboUiConfig config, boolean dark) {
config.userList.title = "Chats";
config.userList.enableFilters = false;
config.messages.enableForward = false;
config.profileViewer.showAddress = true;
}
override fun MesiboUI_onConfig(config: MesiboUiConfig, dark: Boolean) {
config.userList.title = "Chats"
config.userList.enableFilters = false
config.messages.enableForward = false
config.profileViewer.showAddress = true
}
func MesiboUI_onConfig(config: MesiboUiConfig, dark: Bool) {
config.userList.title = "Chats"
config.userList.enableFilters = false
config.messages.enableForward = false
config.profileViewer.showAddress = true
}
- (void)MesiboUI_onConfig:(MesiboUiConfig *)config dark:(BOOL)dark {
config.userList.title = @"Chats";
config.userList.enableFilters = NO;
config.messages.enableForward = NO;
config.profileViewer.showAddress = YES;
}
{
"userList": {"title": "Chats", "enableFilters": false},
"messages": {"enableForward": false},
"profileViewer": {"showAddress": true}
}
The groups
| Group | Settings of |
|---|---|
theme | colors and pictures shared by all screens: toolbar, accent color, letter avatars |
common | texts used on several screens: Cancel, Today, online, typing…, You |
userList | the chat list: title, search, filters, archived chats, drafts, the profile popup |
contacts | the contact lists: new chat, forward, group members, Enter number |
messages | the chat screen: the actions on a message (reply, forward, edit, copy, star, keep, reactions) and their texts |
messageAppearance | the look of the chat: bubbles, text size, spacing, wallpaper |
attachments | the attach button, the camera button, the tiles of the attachment sheet |
imageSending | the size of pictures sent |
messageOptions | the message options sheet: disappear after, expiry, sensitivity |
messageInfo | the message info screen: when a message was delivered and read |
messageStatus | the icons by the time of a message, and the texts of a message that could not be sent |
voiceMessages | recording and playing voice messages |
location | sharing a location (Android only) |
profileViewer | the profile screen of a user profile or a group profile |
profileEditor | the editor of the user profile and of group profiles, and their photos |
groups | creating and editing groups, and their members |
disappearing | the disappearing messages screen |
encryption | the end-to-end encryption screens |
mediaPicker | picking photos, videos and files |
imageEditor | the photo editor |
sensitivity | sensitive messages |
Each setting has a description in the IDE.
Naming
The names follow one convention, the same on Android and iOS:
| Name | Meaning | Example |
|---|---|---|
enableX | A feature the user can use. Off removes it from every screen | messages.enableForward |
enabled | A whole group on or off | attachments.enabled |
showX | Display only. Off hides information; no action is lost | profileViewer.showLastSeen |
XTitle | A short text: a button, a label, a title or a heading | messages.forwardTitle |
XMessage | A sentence: an explanation, an empty list, an error | userList.emptySearchMessage |
XHint | The placeholder of an input field | userList.searchHint |
XColor | A color, 0xAARRGGBB | messageStatus.readColor |
XImage, XImageResource | The app’s own picture: a UIImage on iOS, a drawable resource on Android | attachments.buttonImage |
XLevel | A sensitivity threshold. 0 is off | sensitivity.blockCopyLevel |
maxX | A limit | profileEditor.maxPhotos |
A setting’s name does not repeat the group’s name: messageInfo.title, not
messageInfo.messageInfoTitle.
A list of choices is a list of MesiboUiOption. Each MesiboUiOption has a value, a title,
and an optional detail. Example: imageSending.sizes.
A title set to null (nil) or empty is not displayed.
Dialogs
MesiboDialogs shows the same alerts and bottom sheets as the messaging UI. The app can use it for
its own dialogs, so that they look the same. MesiboDialogs.Options (MesiboDialogOptions on iOS)
sets the content:
| Option | Description |
|---|---|
title, message | The title and the text |
positiveLabel, onPositive | The positive button and its handler. No label: common.okTitle |
negativeLabel, onNegative | The negative button and its handler. No label: no negative button |
destructive | The positive button in red |
sheet | A bottom sheet instead of a centered dialog |
items, onSelect | A list of choices instead of a message. onSelect gets the index of the tapped item |
destructiveItems | The indexes of items shown in red |
MesiboDialogs.Options o = new MesiboDialogs.Options();
o.title = "Delete chats?";
o.positiveLabel = "Delete";
o.negativeLabel = MesiboUI.getConfig().common.cancelTitle;
o.destructive = true;
o.onPositive = () -> deleteChats();
MesiboDialogs.show(context, o);
MesiboDialogs.alert(context, "Signed Out", "Login again to continue.");
val o = MesiboDialogs.Options()
o.title = "Delete chats?"
o.positiveLabel = "Delete"
o.negativeLabel = MesiboUI.getConfig().common.cancelTitle
o.destructive = true
o.onPositive = Runnable { deleteChats() }
MesiboDialogs.show(context, o)
MesiboDialogs.alert(context, "Signed Out", "Login again to continue.")
let o = MesiboDialogOptions()
o.title = "Delete chats?"
o.positiveLabel = "Delete"
o.negativeLabel = MesiboUI.getConfig().common.cancelTitle
o.destructive = true
o.onPositive = { self.deleteChats() }
MesiboDialogs.show(self, options: o)
MesiboDialogs.alert(self, title: "Signed Out", message: "Login again to continue.")
MesiboDialogOptions *o = [MesiboDialogOptions new];
o.title = @"Delete chats?";
o.positiveLabel = @"Delete";
o.negativeLabel = [MesiboUI getConfig].common.cancelTitle;
o.destructive = YES;
o.onPositive = ^{ [self deleteChats]; };
[MesiboDialogs show:self options:o];
[MesiboDialogs alert:self title:@"Signed Out" message:@"Login again to continue."];
Differences between Android and iOS
| Item | Android | iOS |
|---|---|---|
| The app’s own pictures | a drawable resource; the name ends in Resource, for example attachments.buttonImageResource | a UIImage, for example attachments.buttonImage |
| The keyboard of the Enter number field | contacts.enterAddressInputType, an InputType | contacts.enterAddressKeyboard, a UIKeyboardType |
The location group | map tiles, static maps, zoom and their texts | not present; the location picker of MediaPicker is used |
| Placeholders in texts | %s, %d | %@, %d |
| Swipe actions | a full swipe does one action | a swipe shows buttons |
| Color choice in the Customize screen | a grid of colors and a color code field | the system color picker |
| Folder of wallpaper photos | files/mesiboui | Application Support/MesiboUI |