Compare commits
1 Commits
work/redst
...
work/tobia
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd70e2b47f |
@@ -59,7 +59,7 @@ ApplicationWindow {
|
||||
|
||||
Connections {
|
||||
target: mapView.map
|
||||
function onCopyrightLinkActivated() {
|
||||
function onCopyrightLinkActivated(link: string): void {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,21 +60,21 @@ Kirigami.ApplicationWindow {
|
||||
|
||||
Connections {
|
||||
target: LoginHelper
|
||||
function onLoaded() {
|
||||
function onLoaded(): void {
|
||||
root.load();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Registration
|
||||
function onLoaded() {
|
||||
function onLoaded(): void {
|
||||
root.load();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.quitAction
|
||||
function onTriggered() {
|
||||
function onTriggered(): void {
|
||||
Qt.quit();
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ Kirigami.ApplicationWindow {
|
||||
Connections {
|
||||
target: RoomManager
|
||||
|
||||
function onCurrentRoomChanged() {
|
||||
function onCurrentRoomChanged(): void {
|
||||
if (RoomManager.currentRoom && pageStack.depth <= 1 && root.initialized && Kirigami.Settings.isMobile) {
|
||||
let roomPage = pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'RoomPage'));
|
||||
roomPage.backRequested.connect(event => {
|
||||
@@ -107,31 +107,31 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
function onAskJoinRoom(room) {
|
||||
function onAskJoinRoom(room: NeoChatRoom): void {
|
||||
Qt.createComponent("org.kde.neochat", "JoinRoomDialog").createObject(root, {
|
||||
room: room,
|
||||
connection: root.connection
|
||||
}).open();
|
||||
}
|
||||
|
||||
function onShowUserDetail(user, room) {
|
||||
function onShowUserDetail(user, room: NeoChatRoom): void {
|
||||
root.showUserDetail(user, room);
|
||||
}
|
||||
|
||||
function goToEvent(event) {
|
||||
function goToEvent(event: string): void {
|
||||
if (event.length > 0) {
|
||||
roomItem.goToEvent(event);
|
||||
}
|
||||
roomItem.forceActiveFocus();
|
||||
}
|
||||
|
||||
function onAskDirectChatConfirmation(user) {
|
||||
function onAskDirectChatConfirmation(user): void {
|
||||
Qt.createComponent("org.kde.neochat", "AskDirectChatConfirmation").createObject(this, {
|
||||
user: user
|
||||
}).open();
|
||||
}
|
||||
|
||||
function onExternalUrl(url) {
|
||||
function onExternalUrl(url): void {
|
||||
let dialog = Qt.createComponent("org.kde.neochat", "ConfirmUrlDialog").createObject(this);
|
||||
dialog.link = url;
|
||||
dialog.open();
|
||||
|
||||
@@ -72,7 +72,7 @@ Components.AlbumMaximizeComponent {
|
||||
|
||||
Connections {
|
||||
target: MediaManager
|
||||
function onPlaybackStarted() {
|
||||
function onPlaybackStarted(): void {
|
||||
if (currentItem.playbackState === MediaPlayer.PlayingState) {
|
||||
currentItem.pause();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ Components.AlbumMaximizeComponent {
|
||||
Connections {
|
||||
target: currentRoom
|
||||
|
||||
function onFileTransferProgress(id, progress, total) {
|
||||
function onFileTransferProgress(id: string, progress: int, total: int): void {
|
||||
if (id == root.currentEventId) {
|
||||
root.downloadAction.progress = progress / total * 100.0;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ Components.AlbumMaximizeComponent {
|
||||
|
||||
Connections {
|
||||
target: RoomManager
|
||||
function onCloseFullScreen() {
|
||||
function onCloseFullScreen(): void {
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: root.QQC2.ApplicationWindow.window
|
||||
function onClosing() {
|
||||
function onClosing(): void {
|
||||
root.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: root.currentRoom.connection
|
||||
function onIsOnlineChanged() {
|
||||
function onIsOnlineChanged(): void {
|
||||
if (!root.currentRoom.connection.isOnline) {
|
||||
banner.text = i18nc("@info:status", "NeoChat is offline. Please check your network connection.");
|
||||
banner.visible = true;
|
||||
@@ -162,20 +162,20 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: RoomManager
|
||||
function onCurrentRoomChanged() {
|
||||
function onCurrentRoomChanged(): void {
|
||||
if (root.currentRoom && root.currentRoom.isInvite) {
|
||||
Controller.clearInvitationNotification(root.currentRoom.id);
|
||||
}
|
||||
}
|
||||
|
||||
function onGoToEvent(eventId) {
|
||||
function onGoToEvent(eventId: string): void {
|
||||
(timelineViewLoader.item as TimelineView).goToEvent(eventId);
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.currentRoom.connection
|
||||
function onJoinedRoom(room, invited) {
|
||||
function onJoinedRoom(room: NeoChatRoom, invited: NeoChatRoom): void {
|
||||
if (root.currentRoom.id === invited.id) {
|
||||
RoomManager.resolveResource(room.id);
|
||||
}
|
||||
@@ -195,13 +195,13 @@ Kirigami.Page {
|
||||
Connections {
|
||||
target: RoomManager
|
||||
|
||||
function onShowMessage(messageType, message) {
|
||||
function onShowMessage(messageType: Kirigami.MessageType, message: string): void {
|
||||
banner.text = message;
|
||||
banner.type = messageType;
|
||||
banner.visible = true;
|
||||
}
|
||||
|
||||
function onShowEventSource(eventId) {
|
||||
function onShowEventSource(eventId: string): void {
|
||||
(root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
|
||||
sourceText: root.currentRoom.getEventJsonSource(eventId)
|
||||
}, {
|
||||
@@ -210,7 +210,7 @@ Kirigami.Page {
|
||||
});
|
||||
}
|
||||
|
||||
function onShowMessageMenu(eventId, author, messageComponentType, plainText, htmlText, selectedText, hoveredLink, isThread) {
|
||||
function onShowMessageMenu(eventId: string, author, messageComponentType, plainText: string, htmlText: string, selectedText: string, hoveredLink: string, isThread: bool): void {
|
||||
const contextMenu = messageDelegateContextMenu.createObject(root, {
|
||||
selectedText: selectedText,
|
||||
hoveredLink: hoveredLink,
|
||||
|
||||
@@ -177,7 +177,7 @@ QQC2.ComboBox {
|
||||
|
||||
Connections {
|
||||
target: serverListModel
|
||||
function onServerCheckComplete(url, valid) {
|
||||
function onServerCheckComplete(url: string, valid: bool): void {
|
||||
if (url == serverUrlField.text && valid) {
|
||||
serverUrlField.isValidServer = true;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ QQC2.Popup {
|
||||
|
||||
Connections {
|
||||
target: RoomManager
|
||||
function onCurrentRoomChanged() {
|
||||
function onCurrentRoomChanged(): void {
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ Kirigami.Page {
|
||||
}
|
||||
Connections {
|
||||
target: selectionTool.selectionArea
|
||||
function onDoubleClicked() {
|
||||
function onDoubleClicked(): void {
|
||||
rootEditorView.crop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ LoginStep {
|
||||
|
||||
Connections {
|
||||
target: Registration
|
||||
function onConnected(connection): void {
|
||||
function onConnected(connection: NeoChatConnection): void {
|
||||
root.processed("Loading");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ LoginStep {
|
||||
|
||||
Connections {
|
||||
target: Controller
|
||||
function onConnectionAdded(connection) {
|
||||
function onConnectionAdded(connection: NeoChatConnection): void {
|
||||
connection.syncDone.connect(() => root.closeDialog());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ LoginStep {
|
||||
|
||||
Connections {
|
||||
target: LoginHelper
|
||||
function onConnected() {
|
||||
function onConnected(): void {
|
||||
processed("Loading");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@ LoginStep {
|
||||
|
||||
Connections {
|
||||
target: LoginHelper
|
||||
function onSsoUrlChanged() {
|
||||
function onSsoUrlChanged(): void {
|
||||
UrlHelper.openUrl(LoginHelper.ssoUrl);
|
||||
}
|
||||
function onConnected() {
|
||||
function onConnected(): void {
|
||||
processed("Loading");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ Kirigami.Page {
|
||||
Connections {
|
||||
target: Registration
|
||||
|
||||
function onNextStepChanged() {
|
||||
function onNextStepChanged(): void {
|
||||
if (Registration.nextStep === "m.login.recaptcha") {
|
||||
stepConnections.onProcessed("Captcha");
|
||||
}
|
||||
@@ -232,7 +232,7 @@ Kirigami.Page {
|
||||
Connections {
|
||||
target: LoginHelper
|
||||
|
||||
function onLoginErrorOccured(message) {
|
||||
function onLoginErrorOccured(message: string): void {
|
||||
headerMessage.text = message;
|
||||
headerMessage.visible = message.length > 0;
|
||||
headerMessage.type = Kirigami.MessageType.Error;
|
||||
|
||||
@@ -102,7 +102,7 @@ ColumnLayout {
|
||||
|
||||
Connections {
|
||||
target: MediaManager
|
||||
function onPlaybackStarted() {
|
||||
function onPlaybackStarted(): void {
|
||||
if (audio.playbackState === MediaPlayer.PlayingState) {
|
||||
audio.pause();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ ColumnLayout {
|
||||
}
|
||||
Connections {
|
||||
target: mapView.map
|
||||
function onCopyrightLinkActivated() {
|
||||
function onCopyrightLinkActivated(link: string): void {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ ColumnLayout {
|
||||
|
||||
Connections {
|
||||
target: mapView.map
|
||||
function onCopyrightLinkActivated(link: string) {
|
||||
function onCopyrightLinkActivated(link: string): void {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ Video {
|
||||
|
||||
Connections {
|
||||
target: MediaManager
|
||||
function onPlaybackStarted() {
|
||||
function onPlaybackStarted(): void {
|
||||
if (root.playbackState === MediaPlayer.PlayingState) {
|
||||
root.pause();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: mapView.map
|
||||
function onCopyrightLinkActivated(link: string) {
|
||||
function onCopyrightLinkActivated(link: string): void {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: root.Kirigami.PageStack.pageStack
|
||||
onWideModeChanged: {
|
||||
function onWideModeChanged(): void {
|
||||
if ((root.Kirigami.PageStack.pageStack as Kirigami.PageRow).wideMode) {
|
||||
root.Kirigami.PageStack.pop();
|
||||
}
|
||||
|
||||
@@ -93,14 +93,14 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: RoomManager
|
||||
function onCurrentSpaceChanged() {
|
||||
function onCurrentSpaceChanged(): void {
|
||||
treeView.expandRecursively();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: RoomManager.sortFilterRoomTreeModel
|
||||
function onCurrentRoomChanged() {
|
||||
function onCurrentRoomChanged(): void {
|
||||
treeView.positionViewAtIndex(RoomManager.sortFilterRoomTreeModel.currentRoomIndex(), TableView.AlignVCenter)
|
||||
}
|
||||
}
|
||||
@@ -197,7 +197,7 @@ Kirigami.Page {
|
||||
Connections {
|
||||
target: NeoChatConfig
|
||||
|
||||
function onCompactRoomListChanged() {
|
||||
function onCompactRoomListChanged(): void {
|
||||
treeView.collapseRecursively()
|
||||
treeView.expandRecursively()
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ FormCard.FormCardPage {
|
||||
|
||||
data: Connections {
|
||||
target: root.connection
|
||||
function onPasswordStatus(status) {
|
||||
function onPasswordStatus(status): void {
|
||||
if (status === NeoChatConnection.Success) {
|
||||
confirmPassword.status = Kirigami.MessageType.Positive
|
||||
confirmPassword.statusMessage = i18nc("@info", "Password changed successfully");
|
||||
|
||||
@@ -123,7 +123,7 @@ FormCard.FormCardPage {
|
||||
|
||||
property Connections connections: Connections {
|
||||
target: Controller
|
||||
function onConnectionAdded() {
|
||||
function onConnectionAdded(): void {
|
||||
if (pageStack.layers.depth > 2) {
|
||||
pageStack.layers.pop();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ FormCard.FormCardPage {
|
||||
|
||||
Connections {
|
||||
target: root.connection
|
||||
function onIgnoredUsersListChanged() {
|
||||
function onIgnoredUsersListChanged(): void {
|
||||
repeater.model = root.connection.ignoredUsers();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ FormCard.FormCardPage {
|
||||
|
||||
property Connections connections: Connections {
|
||||
target: room
|
||||
onEncryption: {
|
||||
function onEncryption(): void {
|
||||
enableEncryptionSwitch.checked = room.usesEncryption;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ ColumnLayout {
|
||||
Connections {
|
||||
target: threePIdModel
|
||||
|
||||
function onModelReset() {
|
||||
function onModelReset(): void {
|
||||
newCountryCode.text = ""
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ ColumnLayout {
|
||||
Connections {
|
||||
target: threePIdModel
|
||||
|
||||
function onModelReset() {
|
||||
function onModelReset(): void {
|
||||
newId.text = ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,27 +149,27 @@ QQC2.ScrollView {
|
||||
Connections {
|
||||
target: messageListView.model.sourceModel.timelineMessageModel
|
||||
|
||||
function onModelAboutToBeReset() {
|
||||
function onModelAboutToBeReset(): void {
|
||||
(root.QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = "";
|
||||
_private.hasScrolledUpBefore = false;
|
||||
}
|
||||
|
||||
function onModelResetComplete() {
|
||||
function onModelResetComplete(): void {
|
||||
messageListView.positionViewAtBeginning();
|
||||
}
|
||||
|
||||
function onReadMarkerAdded() {
|
||||
function onReadMarkerAdded(): void {
|
||||
if (root.markReadCondition == LibNeoChat.TimelineMarkReadCondition.EntryVisible && messageListView.allUnreadVisible()) {
|
||||
_private.room.markAllMessagesAsRead();
|
||||
}
|
||||
}
|
||||
|
||||
function onNewLocalUserEventAdded() {
|
||||
function onNewLocalUserEventAdded(): void {
|
||||
messageListView.positionViewAtBeginning();
|
||||
_private.room.markAllMessagesAsRead();
|
||||
}
|
||||
|
||||
function onRoomAboutToChange(oldRoom, newRoom) {
|
||||
function onRoomAboutToChange(oldRoom: NeoChatRoom, newRoom: NeoChatRoom): void {
|
||||
if (root.markReadCondition == LibNeoChat.TimelineMarkReadCondition.Exit ||
|
||||
(root.markReadCondition == LibNeoChat.TimelineMarkReadCondition.ExitVisible && messageListView.allUnreadVisible())
|
||||
) {
|
||||
@@ -177,7 +177,7 @@ QQC2.ScrollView {
|
||||
}
|
||||
}
|
||||
|
||||
function onRoomChanged(oldRoom, newRoom) {
|
||||
function onRoomChanged(oldRoom: NeoChatRoom, newRoom: NeoChatRoom): void {
|
||||
if (root.markReadCondition == LibNeoChat.TimelineMarkReadCondition.Entry) {
|
||||
newRoom.markAllMessagesAsRead();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user