diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index dd84ea782..bdd3425fe 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -24,15 +24,10 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- - OS: [e.g. iOS]
- - Browser [e.g. chrome, safari]
- - Version [e.g. 22]
-
-**Smartphone (please complete the following information):**
- - Device: [e.g. iPhone6]
- - OS: [e.g. iOS8.1]
- - Browser [e.g. stock browser, safari]
- - Version [e.g. 22]
+ - OS: [e.g. Windosws]
+ - Version [e.g. 10]
+ - Squeak version [e.g. 5.3]
+
**Additional context**
Add any other context about the problem here.
diff --git a/.github/ci.yml b/.github/ci.yml
index 9a848cc48..edc239e81 100644
--- a/.github/ci.yml
+++ b/.github/ci.yml
@@ -20,9 +20,10 @@ jobs:
strategy:
matrix:
# Select platform(s)
- os: [ ubuntu-latest, macos-latest ]
+ os: [ ubuntu-latest ]
# Select compatible Smalltalk image(s)
- smalltalk: [ Squeak64-trunk, Squeak64-5.3, Squeak64-5.2 ]
+ # currently not running on Squeak64-trunk
+ smalltalk: [ Squeak64-5.3, Squeak64-5.2 ]
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
diff --git a/.github/stale.yml b/.github/stale.yml
new file mode 100644
index 000000000..635e1e2ff
--- /dev/null
+++ b/.github/stale.yml
@@ -0,0 +1,62 @@
+# Configuration for probot-stale - https://github.com/probot/stale
+
+# Number of days of inactivity before an Issue or Pull Request becomes stale
+daysUntilStale: 60
+
+# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
+# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
+daysUntilClose: false
+
+# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
+onlyLabels: []
+
+# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
+exemptLabels:
+ - "User Story"
+ - IMPORTANT
+ - bug
+ - "good first issue"
+
+# Set to true to ignore issues in a project (defaults to false)
+exemptProjects: false
+
+# Set to true to ignore issues in a milestone (defaults to false)
+exemptMilestones: false
+
+# Set to true to ignore issues with an assignee (defaults to false)
+exemptAssignees: false
+
+# Label to use when marking as stale
+staleLabel: stale
+
+# Comment to post when marking as stale. Set to `false` to disable
+markComment: >
+ This issue has been automatically marked as stale because it has not had
+ recent activity. It may be closed if no further activity occurs. Thank you
+ for your contributions.
+
+# Comment to post when removing the stale label.
+# unmarkComment: >
+# ping
+
+# Comment to post when closing a stale Issue or Pull Request.
+# closeComment: >
+# This issue has been closed due to inactivity.
+
+# Limit the number of actions per hour, from 1-30. Default is 30
+limitPerRun: 1
+
+# Limit to only `issues` or `pulls`
+# only: issues
+
+# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
+# pulls:
+# daysUntilStale: 30
+# markComment: >
+# This pull request has been automatically marked as stale because it has not had
+# recent activity. It will be closed if no further activity occurs. Thank you
+# for your contributions.
+
+# issues:
+# exemptLabels:
+# - confirmed
diff --git a/.github/workflows/ci-linter.yml b/.github/workflows/ci-linter.yml
new file mode 100644
index 000000000..55a51b340
--- /dev/null
+++ b/.github/workflows/ci-linter.yml
@@ -0,0 +1,28 @@
+name: CI-Lint
+
+on:
+ push:
+ branches:
+ - develop
+ - master
+ pull_request:
+ branches:
+ - master
+ - develop
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ ubuntu-latest ]
+ smalltalk: [ Squeak64-5.2 ]
+ name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: hpi-swa/setup-smalltalkCI@v1
+ with:
+ smalltalk-version: ${{ matrix.smalltalk }}
+ - run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.lint.ston
+ shell: bash
+ timeout-minutes: 15
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 85c1b36af..b5c5c4faa 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,3 +1,4 @@
+
name: CI
on:
@@ -15,10 +16,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- # Select platform(s)
- os: [ ubuntu-latest, macos-latest ]
- # Select compatible Smalltalk image(s)
- smalltalk: [ Squeak64-trunk, Squeak64-5.3, Squeak64-5.2 ]
+ os: [ ubuntu-latest ]
+ smalltalk: [ Squeak64-5.2 ]
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
@@ -27,3 +26,5 @@ jobs:
smalltalk-version: ${{ matrix.smalltalk }}
- run: smalltalkci -s ${{ matrix.smalltalk }}
timeout-minutes: 15
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release-trunk.yml b/.github/workflows/release-trunk.yml
new file mode 100644
index 000000000..ea4995f32
--- /dev/null
+++ b/.github/workflows/release-trunk.yml
@@ -0,0 +1,47 @@
+name: CI-Release-Trunk
+on:
+ push:
+ branches:
+ - develop
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ ubuntu-latest ]
+ smalltalk: [ Squeak64-5.3 ]
+ name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: hpi-swa/setup-smalltalkCI@v1
+ with:
+ smalltalk-version: ${{ matrix.smalltalk }}
+ - run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston
+ timeout-minutes: 15
+ - name: Get current time
+ uses: 1466587594/get-current-time@v1
+ id: current-time
+ with:
+ format: YYYYMMDD-HH
+ utcOffset: "+01:00"
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: Trunk${{ steps.current-time.outputs.formattedTime }}
+ release_name: Trunk Release ${{ steps.current-time.outputs.formattedTime }}
+ draft: false
+ prerelease: true
+ - name: Upload Release Asset
+ id: upload-release-asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: /home/runner/.smalltalkCI/_builds/TelegramClient.sar
+ asset_name: TelegramClient.sar
+ asset_content_type: application/zip
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..298f1770a
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,47 @@
+name: CI-Release
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ ubuntu-latest ]
+ smalltalk: [ Squeak64-5.3 ]
+ name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: hpi-swa/setup-smalltalkCI@v1
+ with:
+ smalltalk-version: ${{ matrix.smalltalk }}
+ - run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston
+ timeout-minutes: 15
+ - name: Get current time
+ uses: 1466587594/get-current-time@v1
+ id: current-time
+ with:
+ format: YYYYMMDD-HH
+ utcOffset: "+01:00"
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ steps.current-time.outputs.formattedTime }}
+ release_name: Release ${{ steps.current-time.outputs.formattedTime }}
+ draft: false
+ prerelease: false
+ - name: Upload Release Asset
+ id: upload-release-asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: /home/runner/.smalltalkCI/_builds/TelegramClient.sar
+ asset_name: TelegramClient.sar
+ asset_content_type: application/zip
diff --git a/.smalltalk.lint.ston b/.smalltalk.lint.ston
new file mode 100644
index 000000000..a31fd86b6
--- /dev/null
+++ b/.smalltalk.lint.ston
@@ -0,0 +1,17 @@
+SmalltalkCISpec {
+ #loading : [
+ SCIMetacelloLoadSpec {
+ #baseline : 'TelegramClient',
+ #platforms : [ #squeak ],
+ #directory : 'packages',
+ #load : [ 'tests' ],
+ #useLatestMetacello : true
+ }
+ ],
+ #preLoading : [
+ 'scripts/preLoading.st'
+ ],
+ #testing : {
+ #classes : [ #TCTLinterTests ]
+ }
+}
diff --git a/.smalltalk.release.ston b/.smalltalk.release.ston
new file mode 100644
index 000000000..f6841f1dc
--- /dev/null
+++ b/.smalltalk.release.ston
@@ -0,0 +1,16 @@
+SmalltalkCISpec {
+
+ #preLoading : 'scripts/preLoading.st',
+ #loading : [
+ SCIMetacelloLoadSpec {
+ #baseline : 'TelegramClient',
+ #platforms : [ #squeak ],
+ #directory : 'packages',
+ #load : [ 'tests' ]
+ }
+ ],
+ #testing : {
+ #classes : [ #TCTSarFileGenerator ],
+ #defaultTimeout : 60
+ }
+}
diff --git a/.smalltalk.ston b/.smalltalk.ston
index 41b7b120d..daed237d2 100644
--- a/.smalltalk.ston
+++ b/.smalltalk.ston
@@ -8,5 +8,14 @@ SmalltalkCISpec {
#directory : 'packages',
#load : [ 'tests' ]
}
- ]
+ ],
+ #testing : {
+ #coverage : {
+ #packages : [ 'TelegramClient-Core.*' ]
+ },
+ #exclude : {
+ #classes : [ #TCTLinterTests ]
+ },
+ #defaultTimeout : 60
+ }
}
diff --git a/.squot b/.squot
index ca3d6b017..a43ec1953 100644
--- a/.squot
+++ b/.squot
@@ -1,6 +1,6 @@
OrderedDictionary {
- 'packages\/TelegramClient-Core.package' : #SquotCypressCodeSerializer,
- 'packages\/TelegramClient-Tests.package' : #SquotCypressCodeSerializer,
- 'packages\/BaselineOfTelegramClient.package' : #SquotCypressCodeSerializer,
- 'TelegramClient-UI.package' : #SquotCypressCodeSerializer
+ 'packages/TelegramClient-Core.package' : #SquotCypressCodeSerializer,
+ 'packages/TelegramClient-Tests.package' : #SquotCypressCodeSerializer,
+ 'packages/BaselineOfTelegramClient.package' : #SquotCypressCodeSerializer,
+ 'packages/TelegramClient-UI.package' : #SquotCypressCodeSerializer
}
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9a2753d06..6edde254b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -23,14 +23,9 @@
Features |
- feature/fix |
+ feature/bugfix |
Always branch off HEAD of Working |
-
- Hotfix |
- hotfix-* |
- Always branch off Stable |
-
@@ -55,7 +50,6 @@ The different types of branches we may use are:
* Feature branches
* fix branches
-* Hotfix branches
Each of these branches have a specific purpose and are bound to strict rules as to which branches may be their originating branch and which branches must be their merge targets. Each branch and its usage is explained below.
@@ -95,6 +89,8 @@ $ git push origin develop // push merge changes
$ git push origin :feature/GH-id // deletes the remote branch
```
+> Please merge via the CLI instead of merging via Squeak. Otherwise some git-files for the CI and other services will be lost.
+
### Fix Branches
Fix branches differ from feature branches only semantically. Fix branches will be created when there is a bug on the develop branch that should be fixed and merged into the next deployment. For that reason, a bug branch typically will not last longer than one deployment cycle. Additionally, bug branches are used to explicitly track the difference between bug development and feature development. No matter when the bug branch will be finished, it will always be merged back into `develop`.
@@ -105,15 +101,15 @@ Although likelihood will be less, during the lifespan of the bug development, th
* Must branch from: `develop`
* Must merge back into: `develop`
-* Branch naming convention: `fix/GH-`
+* Branch naming convention: `bugfix/GH-`
#### Working with a fix branch
If the branch does not exist yet, create the branch locally and then push to GitHub. A bug branch should always be 'publicly' available. That is, development should never exist in just one developer's local branch.
```
-$ git checkout -b fix/GH-id develop // creates a local branch for the new bug
-$ git push origin fix/GH-id // makes the new bug remotely available
+$ git checkout -b bugfix/GH-id develop // creates a local branch for the new bug
+$ git push origin bugfix/GH-id // makes the new bug remotely available
```
Periodically, changes made to `develop` (if any) should be merged back into your bug branch.
@@ -126,48 +122,7 @@ When development on the bug is complete, [the Lead] should merge changes into `d
```
$ git checkout develop // change to the develop branch
-$ git merge --no-ff fix/GH-id // makes sure to create a commit object during merge
+$ git merge --no-ff bugfix/GH-id // makes sure to create a commit object during merge
$ git push origin develop // push merge changes
-$ git push origin :fix/GH-id // deletes the remote branch
-```
-
-### Hotfix Branches
-
-A hotfix branch comes from the need to act immediately upon an undesired state of a live production version. Additionally, because of the urgency, a hotfix is not required to be be pushed during a scheduled deployment. Due to these requirements, a hotfix branch is always branched from a tagged `master` branch. This is done for two reasons:
-
-* Development on the `develop` branch can continue while the hotfix is being addressed.
-* A tagged `master` branch still represents what is in production. At the point in time where a hotfix is needed, there could have been multiple commits to `develop` which would then no longer represent production.
-
-`` represents the Github issue to which Project Management will be tracked.
-
-* Must branch from: tagged `master`
-* Must merge back into: `master` and `develop`
-* Branch naming convention: `hotfix-/GH-`
-
-#### Working with a hotfix branch
-
-If the branch does not exist yet, create the branch locally and then push to GitHub. A hotfix branch should always be 'publicly' available. That is, development should never exist in just one developer's local branch.
-
+$ git push origin :bugfix/GH-id // deletes the remote branch
```
-$ git checkout -b hotfix-/GH-id master // creates a local branch for the new hotfix
-$ git push origin hotfix-/GH-id // makes the new hotfix remotely available
-```
-
-When development on the hotfix is complete, one person should merge changes into `master` and then update the tag.
-
-```
-$ git checkout master // change to the stable branch
-$ git merge --no-ff hotfix/GH-id // forces creation of commit object during merge
-$ git tag -a // tags the fix
-$ git push origin master --tags // push tag changes
-```
-
-Merge changes into `develop` so not to lose the hotfix and then delete the remote hotfix branch.
-
-```
-$ git checkout develop // change to the master branch
-$ git merge --no-ff hotfix/GH-id // forces creation of commit object during merge
-$ git push origin develop // push merge changes
-$ git push origin :hotfix/GH-id // deletes the remote branch
-```
-
diff --git a/README.md b/README.md
index 8363a0d55..4ad0009fc 100644
--- a/README.md
+++ b/README.md
@@ -1,28 +1,90 @@
-# TelegramClient
-## CI Status
-Develop: ![CI](https://github.com/hpi-swa-teaching/TelegramClient/workflows/CI/badge.svg?branch=develop)
-Master(Release): ![CI](https://github.com/hpi-swa-teaching/TelegramClient/workflows/CI/badge.svg?branch=master)
+
-TelegramClient is a **Squeak-Client** for the widely used Telegram-Messenger. It provides features such as Authentication, Contacts, Message and Media sending and a minimal, clean UI. We also provide features such as a Zen-mode and receiving messages in the background.
+TelegramClient
+
+
+
+
+
+
+
+
+
+
+## Overview
+
+TelegramClient is a **Squeak-Client** for the widely used Telegram-Messenger. It aims to provide features such as Authentication, Contacts, Message and Media sending and a minimal UI as well as as a Zen-mode and receiving messages in the background.
*This Project is part of the "Softwaretechnik" Lecture 2020 at the Hasso Plattner Institute.*
-## Installation
-Make sure you have the current version of Squeak installed.
-1. Install the Squeak Git Client
-2. Install the Squeak FFI Workload
-3. Download the required native Binaries for your system.
- * [Windows](https://drive.google.com/open?id=14tOoIfxioIe8bn2kPxPKmCk_Eg0tSYiJ)
- * [Mac](https://drive.google.com/open?id=1H2l_V6zkIx4t_SKQKL3MmdtvOV2haFjV)
- * [Ubuntu 18 lts](https://drive.google.com/open?id=1CpSPcB-5MPA95fEWI-X5MxbUEZUcU3g2)
-4. Place the unzipped binaries inside of your squeak image. On Windows, place them inside the Win32 folder, on Linux and Mac Os place them inside the resources folder.
+## Features
+
+
+
+
+ ✨ |
+ Feature |
+
+
+
+
+ 🔓 |
+ Authenticate yourself in your Telegram-Account |
+
+
+ ✉️ |
+ Send messages to other users |
+
+
+ 💬 |
+ Display open Chats in a List |
+
+
+ 📫 |
+ Receive messages |
+
+
+ 🆕 |
+ Create new chats |
+
+
+ 🔔 |
+ Receive push notifications |
+
+
+ 🌍 |
+ Start Telegram via WorldMenu |
+
+
+ 🚶 |
+ Logout |
+
+
+
## Running TelegramClient
-In a workspace window execute the command
-## Building Tdlib
-Tdlib build instructions are available on their Github page. They also have a wonderful build instruction generator available which was the basis for our workflow . [Check it out here.](https://tdlib.github.io/td/build.html)
+We currently only support Squeak 5.3.
+
+1. Install the last compatible FFI version. For Squeak version 5.3 use `Metacello new configuration: 'FFI'; load.` to install it.
+
+2. Check our [release page](https://github.com/hpi-swa-teaching/TelegramClient/releases) for an online installer in the form of a sar file. Install this sar file in your Squeak image.
+
+3. Click the Telegram entry in the Apps WorldMenu or execute the command `TCUTelegram newWithTCCCore`. The menu is only available if you already started the app once or installed the app via a release sar file.
+
+For further information or manual setup take a look in our [setup
+guide](https://github.com/hpi-swa-teaching/TelegramClient/wiki/Setup-Guide).
+
+## Development
+
+### Wiki
+
+The [wiki](https://github.com/hpi-swa-teaching/TelegramClient/wiki) has a lot of useful information for continuing the development of this project. Feel free to add new information to the wiki.
+
+### Releasing
+
+Pre-Releases are created automatically whenever a commit is added to the develop-branch. Releases should created before each client meeting and can simply be done by merging develop into master.
+
+## Our Group
-# Notes on Tdlib
-The TelegramClient is build on the TelegramDatabseLibrary which provides access to Telegram API via a JSON-Interface.
-We include Tdlib library in our project and can access the C-Library via FFI from Squeak, giving us the possibility to access the Telegram API via JSON-Interface.
+Group 13 of the 2020 SWT I module included [Rohan Sawahn](https://github.com/rohansaw), [Jonas Schmidt](https://github.com/schmidtjonas), [Frederik Wollny](https://github.com/Freddy200), [Stefan Spangenberg](https://github.com/sspangenberg), [Lukas Laskowski](https://github.com/lasklu) and [Niklas Schilli](https://github.com/Mrnikbobjeff). Feel free to add your names to the list.
diff --git a/TelegramClient-UI.package/.filetree b/TelegramClient-UI.package/.filetree
deleted file mode 100644
index 8998102c2..000000000
--- a/TelegramClient-UI.package/.filetree
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "noMethodMetaData" : true,
- "separateMethodMetaAndSource" : false,
- "useCypressPropertiesFile" : true }
diff --git a/TelegramClient-UI.package/.squot-contents b/TelegramClient-UI.package/.squot-contents
deleted file mode 100644
index 239ddebb0..000000000
--- a/TelegramClient-UI.package/.squot-contents
+++ /dev/null
@@ -1,5 +0,0 @@
-SquotTrackedObjectMetadata {
- #objectClassName : #PackageInfo,
- #objectsReplacedByNames : true,
- #serializer : #SquotCypressCodeSerializer
-}
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUApp.class/README.md b/TelegramClient-UI.package/TCUApp.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUApp.class/class/newWithTCCApp.st b/TelegramClient-UI.package/TCUApp.class/class/newWithTCCApp.st
deleted file mode 100644
index 3a3c2b0ad..000000000
--- a/TelegramClient-UI.package/TCUApp.class/class/newWithTCCApp.st
+++ /dev/null
@@ -1,4 +0,0 @@
-instance creation
-newWithTCCApp
-
- ^ self newWithCore: TCCApp new
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUApp.class/instance/initialize.st b/TelegramClient-UI.package/TCUApp.class/instance/initialize.st
deleted file mode 100644
index 378e5aa0a..000000000
--- a/TelegramClient-UI.package/TCUApp.class/instance/initialize.st
+++ /dev/null
@@ -1,6 +0,0 @@
-initialize-release
-initialize
-
- super initialize.
-
- (TCUAuthentication newWithCore: self core) openCenteredInWorld.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUApp.class/methodProperties.json b/TelegramClient-UI.package/TCUApp.class/methodProperties.json
deleted file mode 100644
index a03b4e564..000000000
--- a/TelegramClient-UI.package/TCUApp.class/methodProperties.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "class" : {
- "newWithCore:" : "R.S 5/31/2020 20:15",
- "newWithTCCApp" : "js 5/31/2020 20:34" },
- "instance" : {
- "core" : "js 5/31/2020 20:04",
- "core:" : "js 5/31/2020 20:04",
- "initialize" : "js 5/31/2020 20:05" } }
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/README.md b/TelegramClient-UI.package/TCUAuthentication.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/core.st b/TelegramClient-UI.package/TCUAuthentication.class/instance/core.st
deleted file mode 100644
index 95ae6d261..000000000
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/core.st
+++ /dev/null
@@ -1,5 +0,0 @@
-initialization
-core
-
- ^ core
-
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/createErrorLabel..st b/TelegramClient-UI.package/TCUAuthentication.class/instance/createErrorLabel..st
deleted file mode 100644
index 2c54fd1ce..000000000
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/createErrorLabel..st
+++ /dev/null
@@ -1,11 +0,0 @@
-initialization
-createErrorLabel: aString
-
- self errorLabel: (TextMorph new
- contents: aString asText;
- center: (self center + (0 @ (self defaultExtent y / 3)));
- color: Color red;
- lock).
-
- self addMorph: self errorLabel.
-
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/createInputField..st b/TelegramClient-UI.package/TCUAuthentication.class/instance/createInputField..st
deleted file mode 100644
index 794c18c48..000000000
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/createInputField..st
+++ /dev/null
@@ -1,12 +0,0 @@
-initialization
-createInputField: aString
-
- self inputField: (TextMorph new
- contentsWrapped: aString asText;
- extent: 150 @ 50;
- borderColor: TCUDefaultValues colorGray;
- borderWidth: 1;
- center: self instructionLabel center + (0 @ 30);
- crAction: [self buttonNextPressed]).
-
- ^ self inputField
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/showFirstStep.st b/TelegramClient-UI.package/TCUAuthentication.class/instance/showFirstStep.st
deleted file mode 100644
index 5755073bf..000000000
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/showFirstStep.st
+++ /dev/null
@@ -1,15 +0,0 @@
-accessing
-showFirstStep
-
- self instructionLabel
- contents: 'Enter Phonenumber: ' asText;
- center: self center.
-
- self
- addMorph: (self createInputField: '+49');
- buttonNext: (TCUButton new
- text: 'Next';
- center: inputField center + (0 @ 50);
- on: #mouseDown send: #buttonNextPressed to: self);
- addMorph: buttonNext;
- createErrorLabel: ''.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/showSecondStep.st b/TelegramClient-UI.package/TCUAuthentication.class/instance/showSecondStep.st
deleted file mode 100644
index 9862ff2f8..000000000
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/showSecondStep.st
+++ /dev/null
@@ -1,17 +0,0 @@
-accessing
-showSecondStep
-
- self buttonNext delete.
- self instructionLabel
- contents: 'Enter the code your recieved on your phone';
- center: self center.
-
- self inputField contents: ' '.
- self errorLabel delete.
-
- self
- buttonVerify: (TCUButton new
- text: 'Verify';
- center: self inputField center + (70 @ 50);
- on: #mouseDown send: #buttonVerifyPressed to: self);
- addMorph: self buttonVerify.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/methodProperties.json b/TelegramClient-UI.package/TCUAuthentication.class/methodProperties.json
deleted file mode 100644
index 26f5a88ac..000000000
--- a/TelegramClient-UI.package/TCUAuthentication.class/methodProperties.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "class" : {
- "newWithCore:" : "R.S 5/31/2020 20:16" },
- "instance" : {
- "addHeader" : "js 5/28/2020 17:47",
- "addTitle:to:" : "js 5/28/2020 17:48",
- "buttonNext" : "R.S 5/20/2020 13:50",
- "buttonNext:" : "js 5/28/2020 17:49",
- "buttonNextPressed" : "js 5/31/2020 20:06",
- "buttonVerify" : "R.S 5/20/2020 13:50",
- "buttonVerify:" : "R.S 5/20/2020 13:50",
- "buttonVerifyPressed" : "js 5/31/2020 20:10",
- "core" : "R.S 5/31/2020 20:18",
- "core:" : "R.S 5/31/2020 20:18",
- "createErrorLabel:" : "R.S 5/20/2020 13:50",
- "createInputField:" : "js 5/28/2020 17:55",
- "createLabel:" : "R.S 5/20/2020 13:51",
- "defaultExtent" : "R.S 5/20/2020 13:51",
- "defaultInputWidth" : "R.S 5/20/2020 13:51",
- "delete" : "f.w. 6/3/2020 20:51",
- "errorLabel" : "R.S 5/20/2020 13:51",
- "errorLabel:" : "R.S 5/20/2020 13:51",
- "initialize" : "js 5/31/2020 20:05",
- "inputField" : "R.S 5/20/2020 13:51",
- "inputField:" : "js 5/31/2020 20:07",
- "instructionLabel" : "R.S 5/20/2020 13:52",
- "instructionLabel:" : "js 5/28/2020 17:51",
- "logInCompleted" : "R.S 6/3/2020 20:54",
- "showFirstStep" : "js 5/28/2020 17:52",
- "showLoadingMessage" : "R.S 5/24/2020 16:09",
- "showSecondStep" : "js 5/28/2020 17:53",
- "subscribeCore" : "R.S 5/31/2020 20:21" } }
diff --git a/TelegramClient-UI.package/TCUButton.class/README.md b/TelegramClient-UI.package/TCUButton.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUButton.class/methodProperties.json b/TelegramClient-UI.package/TCUButton.class/methodProperties.json
deleted file mode 100644
index 88279189e..000000000
--- a/TelegramClient-UI.package/TCUButton.class/methodProperties.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "initialize" : "js 5/28/2020 17:47",
- "text" : "R.S 5/20/2020 13:56",
- "text:" : "js 5/28/2020 17:56" } }
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/README.md b/TelegramClient-UI.package/TCUChatListItem.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/class/newWithChatName.andWidth..st b/TelegramClient-UI.package/TCUChatListItem.class/class/newWithChatName.andWidth..st
deleted file mode 100644
index b01cee454..000000000
--- a/TelegramClient-UI.package/TCUChatListItem.class/class/newWithChatName.andWidth..st
+++ /dev/null
@@ -1,10 +0,0 @@
-as yet unclassified
-newWithChatName: aChatName andWidth: aWidth
-
- ^ self basicNew
- chatName: aChatName;
- initialize;
- width: aWidth;
- addTitle;
- addBorder;
- yourself.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/instance/addTitle.st b/TelegramClient-UI.package/TCUChatListItem.class/instance/addTitle.st
deleted file mode 100644
index f21838f07..000000000
--- a/TelegramClient-UI.package/TCUChatListItem.class/instance/addTitle.st
+++ /dev/null
@@ -1,7 +0,0 @@
-initialization
-addTitle
-
- self addMorphCentered: (TextMorph new
- contents: self chatName asText;
- lock).
-
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName..st b/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName..st
deleted file mode 100644
index cd84f2bf4..000000000
--- a/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-chatName: anObject
-
- chatName := anObject.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/instance/defaultHeight.st b/TelegramClient-UI.package/TCUChatListItem.class/instance/defaultHeight.st
deleted file mode 100644
index 0a540810b..000000000
--- a/TelegramClient-UI.package/TCUChatListItem.class/instance/defaultHeight.st
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultValues
-defaultHeight
-
- ^ 50
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/methodProperties.json b/TelegramClient-UI.package/TCUChatListItem.class/methodProperties.json
deleted file mode 100644
index d95338a8a..000000000
--- a/TelegramClient-UI.package/TCUChatListItem.class/methodProperties.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "class" : {
- "newWithChatName:andWidth:" : "R.S 6/4/2020 09:52" },
- "instance" : {
- "addBorder" : "R.S 6/1/2020 22:20",
- "addTitle" : "R.S 6/1/2020 14:53",
- "chatName" : "R.S 6/1/2020 14:22",
- "chatName:" : "R.S 6/1/2020 14:21",
- "defaultHeight" : "R.S 6/1/2020 14:22",
- "initialize" : "R.S 6/4/2020 09:51" } }
diff --git a/TelegramClient-UI.package/TCUChatWindow.class/README.md b/TelegramClient-UI.package/TCUChatWindow.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json b/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json
deleted file mode 100644
index b4a306d78..000000000
--- a/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "initialize" : "R.S 6/1/2020 14:23" } }
diff --git a/TelegramClient-UI.package/TCUChatsList.class/README.md b/TelegramClient-UI.package/TCUChatsList.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/addItem..st b/TelegramClient-UI.package/TCUChatsList.class/instance/addItem..st
deleted file mode 100644
index 949a6edbe..000000000
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/addItem..st
+++ /dev/null
@@ -1,8 +0,0 @@
-accessing
-addItem: aTitle
-
- | item |
- item := TCUChatListItem newWithChatName: aTitle andWidth: self width.
-
- self items add: item.
- self addMorph: item.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/clearChats.st b/TelegramClient-UI.package/TCUChatsList.class/instance/clearChats.st
deleted file mode 100644
index 335214383..000000000
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/clearChats.st
+++ /dev/null
@@ -1,6 +0,0 @@
-initialization
-clearChats
-
- self items do: [:aItem | aItem delete.
- self items remove: aItem].
-
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/items..st b/TelegramClient-UI.package/TCUChatsList.class/instance/items..st
deleted file mode 100644
index 75624f7e6..000000000
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/items..st
+++ /dev/null
@@ -1,3 +0,0 @@
-accessing
-items: anObject
- items := anObject
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/methodProperties.json b/TelegramClient-UI.package/TCUChatsList.class/methodProperties.json
deleted file mode 100644
index f2945127e..000000000
--- a/TelegramClient-UI.package/TCUChatsList.class/methodProperties.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "addItem:" : "R.S 6/4/2020 09:52",
- "clearChats" : "R.S 6/3/2020 21:18",
- "defaultWidth" : "R.S 6/1/2020 14:24",
- "initialize" : "R.S 6/3/2020 21:19",
- "initializeLayout" : "R.S 6/1/2020 15:00",
- "items" : "R.S 6/3/2020 21:15",
- "items:" : "R.S 6/3/2020 21:15" } }
diff --git a/TelegramClient-UI.package/TCUDefaultValues.class/README.md b/TelegramClient-UI.package/TCUDefaultValues.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightBlue.st b/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightBlue.st
deleted file mode 100644
index 62ab12bf2..000000000
--- a/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightBlue.st
+++ /dev/null
@@ -1,4 +0,0 @@
-colors
-colorLightBlue
-
- ^ (Color r: (64 /255) g: (167 / 255) b: (227 / 255))
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUDefaultValues.class/methodProperties.json b/TelegramClient-UI.package/TCUDefaultValues.class/methodProperties.json
deleted file mode 100644
index 9e30b8ad8..000000000
--- a/TelegramClient-UI.package/TCUDefaultValues.class/methodProperties.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "class" : {
- "colorGray" : "R.S 5/20/2020 13:41",
- "colorLightBlue" : "R.S 5/20/2020 13:41",
- "colorLightGray" : "R.S 6/1/2020 14:25" },
- "instance" : {
- } }
diff --git a/TelegramClient-UI.package/TCUMain.class/README.md b/TelegramClient-UI.package/TCUMain.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/addChatWindow.st b/TelegramClient-UI.package/TCUMain.class/instance/addChatWindow.st
deleted file mode 100644
index f011584a9..000000000
--- a/TelegramClient-UI.package/TCUMain.class/instance/addChatWindow.st
+++ /dev/null
@@ -1,10 +0,0 @@
-initialization
-addChatWindow
-
- self
- chatWindow: (TCUChatWindow new
- height: (self height - self defaultHeaderHeight);
- width: (self width - self chatsList width);
- position: (self position + (self chatsList width @ self defaultHeaderHeight)));
- addMorph: self chatWindow.
-
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/addChatsList.st b/TelegramClient-UI.package/TCUMain.class/instance/addChatsList.st
deleted file mode 100644
index 881d8ea4e..000000000
--- a/TelegramClient-UI.package/TCUMain.class/instance/addChatsList.st
+++ /dev/null
@@ -1,8 +0,0 @@
-initialization
-addChatsList
-
- self
- chatsList: (TCUChatsList new
- height: (self height - self defaultHeaderHeight);
- position: (self position + (0 @ self defaultHeaderHeight)));
- addMorph: self chatsList .
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/addHeader.st b/TelegramClient-UI.package/TCUMain.class/instance/addHeader.st
deleted file mode 100644
index bb643ae5c..000000000
--- a/TelegramClient-UI.package/TCUMain.class/instance/addHeader.st
+++ /dev/null
@@ -1,23 +0,0 @@
-initialization
-addHeader
-
- | header logoutButton |
-
-
-
- header := RectangleMorph new
- borderWidth: 0;
- color: TCUDefaultValues colorGray;
- extent: self width @ self defaultHeaderHeight.
-
- logoutButton := TCUButton new
- text: 'logout';
- on:#mouseUp send: #logout to: self;
- position: header position + 5.
-
- self
- addMorph: header;
- addTitle: 'Telegram' to: header;
- addMorph: logoutButton.
-
-
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/addTitle.to..st b/TelegramClient-UI.package/TCUMain.class/instance/addTitle.to..st
deleted file mode 100644
index 145f195a0..000000000
--- a/TelegramClient-UI.package/TCUMain.class/instance/addTitle.to..st
+++ /dev/null
@@ -1,10 +0,0 @@
-accessing
-addTitle: aString to: aMorph
-
- | titleLable font |
- font:= (TextFontReference toFont: (StrikeFont familyName: 'DefaultTextStyle' size: 35)).
- titleLable := TextMorph new
- contents: (aString asText addAttribute: font);
- color: Color white.
-
- aMorph addMorphCentered: titleLable.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/subscribeCore.st b/TelegramClient-UI.package/TCUMain.class/instance/subscribeCore.st
deleted file mode 100644
index a182cb6e7..000000000
--- a/TelegramClient-UI.package/TCUMain.class/instance/subscribeCore.st
+++ /dev/null
@@ -1,4 +0,0 @@
-initialization
-subscribeCore
-
- self core when: #newChatLoaded send: #updateChatsList to: self.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/updateChatsList.st b/TelegramClient-UI.package/TCUMain.class/instance/updateChatsList.st
deleted file mode 100644
index 777e4e7c5..000000000
--- a/TelegramClient-UI.package/TCUMain.class/instance/updateChatsList.st
+++ /dev/null
@@ -1,12 +0,0 @@
-initialization
-updateChatsList
-
- | chats i|
- self chatsList clearChats.
- chats := self core chats asSortedCollection: [:x :y| x order < y order].
-
- i := 0.
-
- chats do: [:aChat| i < 10 ifTrue: [
- aChat fullName isNil not ifTrue: [
- self chatsList addItem: aChat fullName]]].
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/methodProperties.json b/TelegramClient-UI.package/TCUMain.class/methodProperties.json
deleted file mode 100644
index 240937c3a..000000000
--- a/TelegramClient-UI.package/TCUMain.class/methodProperties.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "class" : {
- "newWithCore:" : "f.w. 6/3/2020 20:31" },
- "instance" : {
- "addChatWindow" : "R.S 6/1/2020 14:26",
- "addChatsList" : "R.S 6/1/2020 14:26",
- "addHeader" : "f.w. 6/3/2020 20:23",
- "addTitle:to:" : "R.S 6/1/2020 14:26",
- "chatWindow" : "R.S 6/1/2020 14:27",
- "chatWindow:" : "R.S 6/1/2020 14:27",
- "chatsList" : "R.S 6/1/2020 14:27",
- "chatsList:" : "R.S 6/1/2020 14:27",
- "logout" : "js 5/29/2020 09:35",
- "core" : "R.S 6/1/2020 22:27",
- "core:" : "R.S 6/1/2020 22:27",
- "defaultExtent" : "R.S 6/1/2020 14:27",
- "defaultHeaderHeight" : "R.S 6/1/2020 14:27",
- "delete" : "R.S 6/3/2020 20:54",
- "initialize" : "R.S 6/3/2020 21:21",
- "subscribeCore" : "R.S 6/3/2020 21:03",
- "updateChatsList" : "R.S 6/4/2020 10:12" } }
diff --git a/TelegramClient-UI.package/monticello.meta/categories.st b/TelegramClient-UI.package/monticello.meta/categories.st
deleted file mode 100644
index 4320f13cf..000000000
--- a/TelegramClient-UI.package/monticello.meta/categories.st
+++ /dev/null
@@ -1 +0,0 @@
-SystemOrganization addCategory: #'TelegramClient-UI'!
diff --git a/TelegramClient-UI.package/monticello.meta/initializers.st b/TelegramClient-UI.package/monticello.meta/initializers.st
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TelegramClient-UI.package/properties.json b/TelegramClient-UI.package/properties.json
deleted file mode 100644
index f037444a7..000000000
--- a/TelegramClient-UI.package/properties.json
+++ /dev/null
@@ -1,2 +0,0 @@
-{
- }
diff --git a/assets/logo.png b/assets/logo.png
new file mode 100644
index 000000000..eabb5ba30
Binary files /dev/null and b/assets/logo.png differ
diff --git a/packages/BaselineOfTelegramClient.package/BaselineOfTelegramClient.class/instance/baseline..st b/packages/BaselineOfTelegramClient.package/BaselineOfTelegramClient.class/instance/baseline..st
index 5d4e7274f..9e30e3882 100644
--- a/packages/BaselineOfTelegramClient.package/BaselineOfTelegramClient.class/instance/baseline..st
+++ b/packages/BaselineOfTelegramClient.package/BaselineOfTelegramClient.class/instance/baseline..st
@@ -1,77 +1,32 @@
baseline
baseline: spec
-
- spec
- for: #'common'
- do: [
- Preferences disable: #showDeprecationWarnings.
- spec
- project: 'RefactoringBrowser' with: [
- spec
- className: 'ConfigurationOfRefactoringBrowser';
- versionString: #'stable';
- loads: #('Core' );
- repository: 'http://www.squeaksource.com/MetacelloRepository' ];
- project: 'Grease' with: [
- spec
- className: 'ConfigurationOfGrease';
- versionString: #'stable';
- loads: #('Slime');
- repository: 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main';
- repository: 'http://www.squeaksource.com/MetacelloRepository'];
- project: 'Seaside3' with: [
- spec
- className: 'ConfigurationOfSeaside3';
- versionString: #'stable';
- loads: #('Development');
- repository: 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main';
- repository: 'http://www.squeaksource.com/MetacelloRepository'].
- spec
- package: 'JSON'
- with: [
- spec
- file: 'JSON-ul.35';
- repository:
- 'http://www.squeaksource.com/JSON' ];
- package: 'FFI-Pools' with: [
- spec
- file: 'FFI-Pools-eem.13';
- repository:
- 'http://source.squeakfoundation.org/FFI' ];
- package: 'FFI-Kernel' with: [
- spec
- file: 'FFI-Kernel-nice.68';
- repository:
- 'http://source.squeakfoundation.org/FFI' ];
-
- "swalint setup"
- package: 'SwaLint-Preferences' with: [
- spec
- file: 'SwaLint-Preferences-cypress.1';
- repository:
- 'github://hpi-swa-teaching/SwaLint:master/packages' ];
- package: 'SwaLint-Core' with: [spec
- file: 'SwaLint-Core-cypress.1';
- repository:
- 'github://hpi-swa-teaching/SwaLint:master/packages';
- requires: #('RefactoringBrowser' 'SwaLint-Preferences')];
- postLoadDoIt: #postLoad;
- package: 'SwaLint-PlugIns' with: [ spec file: 'SwaLint-PlugIns-cypress.1';
- repository:
- 'github://hpi-swa-teaching/SwaLint:master/packages'; requires: 'SwaLint-Core' ];
-
-
- package: 'TelegramClient-Core' with: [spec requires: #('FFI-Pools' 'FFI-Kernel')];
- package: 'TelegramClient-Tests' with: [spec requires: #('default' 'All' )];
- yourself.
- spec
- group: 'libraries' with: #( 'JSON' 'FFI-Kernel' 'FFI-Pools');
- group: 'default' with: #('TelegramClient-Core');
- group: 'tests' with: #('TelegramClient-Tests' )];
- group: 'default' with: #('PlugIns');
- group: 'portability' with: #('PlugIns');
- group: 'web' with: #('portability' );
- group: 'Core' with: #('SwaLint-Core');
- group: 'All' with: #( 'web');
- group: 'PlugIns' with: #('SwaLint-PlugIns');
- yourself
\ No newline at end of file
+
+ spec
+ for: #'common'
+ do: [
+ Preferences disable: #showDeprecationWarnings.
+ spec
+ baseline: 'SwaLint' with: [
+ spec
+ repository: 'github://hpi-swa-teaching/SwaLint:release/packages'];
+ package: 'JSON' with: [
+ spec
+ file: 'JSON-ul.35';
+ repository: 'http://www.squeaksource.com/JSON'];
+ package: 'FFI-Pools' with: [
+ spec
+ file: 'FFI-Pools-eem.13';
+ repository: 'http://source.squeakfoundation.org/FFI'];
+ package: 'FFI-Kernel' with: [
+ spec
+ file: 'FFI-Kernel-nice.68';
+ repository: 'http://source.squeakfoundation.org/FFI'];
+
+ package: 'TelegramClient-Core' with: [spec requires: #('libraries')];
+ package: 'TelegramClient-UI' with: [spec requires: #('libraries')];
+ package: 'TelegramClient-Tests' with: [spec requires: #('default' 'SwaLint')].
+
+ spec
+ group: 'libraries' with: #('JSON' 'FFI-Kernel' 'FFI-Pools');
+ group: 'default' with: #('TelegramClient-Core' 'TelegramClient-UI');
+ group: 'tests' with: #('TelegramClient-Tests')].
diff --git a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/README.md b/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/client..st b/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/client..st
deleted file mode 100644
index 9ff830173..000000000
--- a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/client..st
+++ /dev/null
@@ -1,3 +0,0 @@
-accessing
-client: anObject
- client := anObject
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/client.st b/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/client.st
deleted file mode 100644
index bd2a5f261..000000000
--- a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/client.st
+++ /dev/null
@@ -1,3 +0,0 @@
-accessing
-client
- ^ client
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/createClient..st b/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/createClient..st
deleted file mode 100644
index d92d859f2..000000000
--- a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/instance/createClient..st
+++ /dev/null
@@ -1,4 +0,0 @@
-Creation
-createClient: anOsName
-
- ^ self subclassResponsibility
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/methodProperties.json
deleted file mode 100644
index cae6a5531..000000000
--- a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/methodProperties.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "createClient:" : "js 5/28/2020 17:00" } }
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/README.md b/packages/TelegramClient-Core.package/TCCApp.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/addChat..st b/packages/TelegramClient-Core.package/TCCApp.class/instance/addChat..st
deleted file mode 100644
index 4f769b130..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/addChat..st
+++ /dev/null
@@ -1,11 +0,0 @@
-accessing
-addChat: aChatEvent
-
- | userId chat |
-
- userId := aChatEvent at: 'user_id'.
- chat := TCCChat new userId: userId.
- chat fullName ifNil: [self messageHandler getChatInfos: userId].
- chat order ifNil: [chat order: '0'].
-
- self chats at: userId put: chat.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/client..st b/packages/TelegramClient-Core.package/TCCApp.class/instance/client..st
deleted file mode 100644
index 96c693d73..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/client..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-client: anObject
-
- client := anObject
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/getChats.st b/packages/TelegramClient-Core.package/TCCApp.class/instance/getChats.st
deleted file mode 100644
index cab93e8f5..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/getChats.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-getChats
-
- self messageHandler getChats.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/handleEvent..st b/packages/TelegramClient-Core.package/TCCApp.class/instance/handleEvent..st
deleted file mode 100644
index 29849a793..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/handleEvent..st
+++ /dev/null
@@ -1,22 +0,0 @@
-accessing
-handleEvent: anEvent
-
- | update |
-
- update := nil.
- (((anEvent at: '@type') = 'error') and: [(anEvent at: 'code') = 400 ])
- ifTrue: [self halt: 'There probably already is an instance of TCClient running'].
-
- (anEvent at: '@type') = 'updateAuthorizationState'
- ifTrue: [update := self authHandler handleEvent: anEvent].
-
- (anEvent at: '@type') = 'chats'
- ifTrue: [update := self messageHandler handleEvent: anEvent].
-
- (anEvent at: '@type') = 'updateUserFullInfo'
- ifTrue: [self addChat: anEvent].
-
- (anEvent at: '@type') = 'chat'
- ifTrue: [self setChatInfos: anEvent].
-
- update isSymbol ifTrue: [self triggerEvent: update].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/initialize.st b/packages/TelegramClient-Core.package/TCCApp.class/instance/initialize.st
deleted file mode 100644
index 56bfc6034..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/initialize.st
+++ /dev/null
@@ -1,9 +0,0 @@
-initialization
-initialize
-
- self
- initializeClient;
- initializeHandlers;
- chats: Dictionary new.
-
- [self receiveLoop] fork.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/initializeClient.st b/packages/TelegramClient-Core.package/TCCApp.class/instance/initializeClient.st
deleted file mode 100644
index 4e83f2502..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/initializeClient.st
+++ /dev/null
@@ -1,7 +0,0 @@
-initialization
-initializeClient
-
- | specificClient |
- specificClient := TCCTeleClientFactory new createClient.
-
- self client: (TCCTeleClient newWithClient: specificClient).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/initializeHandlers.st b/packages/TelegramClient-Core.package/TCCApp.class/instance/initializeHandlers.st
deleted file mode 100644
index 6de508a53..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/initializeHandlers.st
+++ /dev/null
@@ -1,6 +0,0 @@
-initialization
-initializeHandlers
-
- self
- authHandler: (TCCAuthHandler new app: self);
- messageHandler: (TCCMessageHandler new app: self).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/messageHandler..st b/packages/TelegramClient-Core.package/TCCApp.class/instance/messageHandler..st
deleted file mode 100644
index a66760e20..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/messageHandler..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-messageHandler: aMessageHandler
-
- messageHandler := aMessageHandler.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/messageHandler.st b/packages/TelegramClient-Core.package/TCCApp.class/instance/messageHandler.st
deleted file mode 100644
index 9f4bcfa44..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/messageHandler.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-messageHandler
-
- ^ messageHandler
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/setChatInfos..st b/packages/TelegramClient-Core.package/TCCApp.class/instance/setChatInfos..st
deleted file mode 100644
index cc6639a7a..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/setChatInfos..st
+++ /dev/null
@@ -1,11 +0,0 @@
-accessing
-setChatInfos: anEvent
-
- | chatId |
-
- chatId := anEvent at: 'id'.
- (self chats at: chatId)
- fullName: (anEvent at: 'title');
- order: (anEvent at: 'order').
-
- self triggerEvent: #newChatLoaded.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/update.st b/packages/TelegramClient-Core.package/TCCApp.class/instance/update.st
deleted file mode 100644
index 8da04157d..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/update.st
+++ /dev/null
@@ -1,7 +0,0 @@
-accessing
-update
-
- | event |
-
- event := self client receive: 0.05.
- event isNil ifFalse: [self handleEvent: event].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCApp.class/methodProperties.json
deleted file mode 100644
index 69ace99c0..000000000
--- a/packages/TelegramClient-Core.package/TCCApp.class/methodProperties.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "addChat:" : "R.S 6/4/2020 10:11",
- "authHandler" : "R.S 5/20/2020 16:10",
- "authHandler:" : "R.S 5/20/2020 16:10",
- "chats" : "R.S 6/1/2020 15:34",
- "chats:" : "R.S 6/1/2020 15:34",
- "checkAuthenticationCode:" : "js 5/31/2020 20:10",
- "client" : "R.S 5/20/2020 16:08",
- "client:" : "R.S 5/20/2020 16:08",
- "getChats" : "js 6/1/2020 15:06",
- "handleEvent:" : "js 5/29/2020 09:38",
- "initialize" : "R.S 6/1/2020 15:52",
- "initializeClient" : "f.w. 5/31/2020 19:01",
- "initializeHandlers" : "js 6/1/2020 14:45",
- "isClientAlive" : "js 5/28/2020 17:18",
- "messageHandler" : "js 6/1/2020 14:46",
- "messageHandler:" : "js 6/1/2020 14:46",
- "receiveLoop" : "R.S 6/1/2020 15:24",
- "sendPhoneNumber:" : "js 5/31/2020 20:08",
- "setChatInfos:" : "R.S 6/4/2020 10:11",
- "update" : "js 5/28/2020 17:28" } }
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/README.md b/packages/TelegramClient-Core.package/TCCAuthHandler.class/README.md
index e69de29bb..e3e165f4b 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/README.md
@@ -0,0 +1 @@
+This class handles everything that is required to authenticate with tdlib.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/apiHash.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/apiHash.st
new file mode 100644
index 000000000..4f78ac54a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/apiHash.st
@@ -0,0 +1,4 @@
+default values
+apiHash
+
+ ^ 'a3406de8d171bb422bb6ddf3bbd800e2'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/apiID.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/apiID.st
new file mode 100644
index 000000000..1deff4243
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/apiID.st
@@ -0,0 +1,4 @@
+default values
+apiID
+
+ ^ '94575'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/app.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/app.st
index e1ec06e29..903c29d40 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/app.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/app.st
@@ -1,4 +1,4 @@
accessing
app
-
+
^ app
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/checkAuthenticationCode..st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/checkAuthenticationCode..st
index 53cc97b51..caae56981 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/checkAuthenticationCode..st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/checkAuthenticationCode..st
@@ -1,4 +1,6 @@
-accessing
+library calls
checkAuthenticationCode: aString
- self client send: '{"@type": "checkAuthenticationCode", "code": "', aString, '"}'.
\ No newline at end of file
+ self client send: (TCCRequest
+ newWithType: 'checkAuthenticationCode'
+ from: {'code' -> aString}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/handleEvent..st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/handleEvent..st
index b0763a0a5..b4da328ff 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/handleEvent..st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/handleEvent..st
@@ -1,16 +1,11 @@
-accessing
+event handling
handleEvent: anEvent
- self authState: (anEvent at: 'authorization_state').
-
+ self authState: ((anEvent at: 'authorization_state') at: '@type').
+
self isAuthStateClosed ifTrue: [self client free].
-
self isAwaitingTDLibParams ifTrue: [self setTDLibParams].
-
self isAwaitingDBEncryptionKey ifTrue: [self setDBEncryptionKey: ''].
-
self isAwaitingPhoneNumber ifTrue: [^ #awaitPhoneNumber].
-
self isAwaitingAuthCode ifTrue: [^ #awaitAuthCode].
-
- self isAuthorizationStateReady ifTrue: [^ #authReady].
\ No newline at end of file
+ self isAuthorizationStateReady ifTrue: [^ self app authSucceeded].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/initialize.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/initialize.st
new file mode 100644
index 000000000..4ab07c117
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/initialize.st
@@ -0,0 +1,4 @@
+initialize
+initialize
+
+ self authState: ''.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthStateClosed.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthStateClosed.st
index 4b6ec5f36..5550f6ff0 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthStateClosed.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthStateClosed.st
@@ -1,4 +1,4 @@
accessing
isAuthStateClosed
- ^ (self authState at: '@type') = 'authorizationStateClosed'
\ No newline at end of file
+ ^ self authState = 'authorizationStateClosed'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthorizationStateReady.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthorizationStateReady.st
index f782d0b10..890173a67 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthorizationStateReady.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAuthorizationStateReady.st
@@ -1,6 +1,4 @@
-initialize
+accessing
isAuthorizationStateReady
- ^ (self authState at: '@type') = 'authorizationStateReady'
-
-
\ No newline at end of file
+ ^ self authState = 'authorizationStateReady'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingAuthCode.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingAuthCode.st
index 4a39fe03d..2c5979f9a 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingAuthCode.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingAuthCode.st
@@ -1,5 +1,4 @@
accessing
isAwaitingAuthCode
- ^ (self authState at: '@type') = 'authorizationStateWaitCode'
-
\ No newline at end of file
+ ^ self authState = 'authorizationStateWaitCode'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingDBEncryptionKey.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingDBEncryptionKey.st
index 2bbe5fb82..b9e37467c 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingDBEncryptionKey.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingDBEncryptionKey.st
@@ -1,4 +1,4 @@
accessing
isAwaitingDBEncryptionKey
- ^ (self authState at: '@type') = 'authorizationStateWaitEncryptionKey'
\ No newline at end of file
+ ^ self authState = 'authorizationStateWaitEncryptionKey'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingPhoneNumber.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingPhoneNumber.st
index 61266e4f9..4f8c8f5b5 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingPhoneNumber.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingPhoneNumber.st
@@ -1,4 +1,4 @@
accessing
isAwaitingPhoneNumber
- ^ (self authState at: '@type') = 'authorizationStateWaitPhoneNumber'
\ No newline at end of file
+ ^ self authState = 'authorizationStateWaitPhoneNumber'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingTDLibParams.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingTDLibParams.st
index 795763ae3..d16205ed2 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingTDLibParams.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/isAwaitingTDLibParams.st
@@ -1,4 +1,4 @@
accessing
isAwaitingTDLibParams
- ^ (self authState at: '@type') = 'authorizationStateWaitTdlibParameters'
\ No newline at end of file
+ ^ self authState = 'authorizationStateWaitTdlibParameters'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/logout.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/logout.st
index 1c62979cf..c7ffff23d 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/logout.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/logout.st
@@ -1,4 +1,6 @@
-accessing
+library calls
logout
- self client send: '{"@type": "logOut"}'.
\ No newline at end of file
+ self client send: (TCCRequest
+ newWithType: 'logOut'
+ from: {}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/sendPhoneNumber..st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/sendPhoneNumber..st
index 6ff5b8477..5c453e865 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/sendPhoneNumber..st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/sendPhoneNumber..st
@@ -1,4 +1,6 @@
-accessing
+library calls
sendPhoneNumber: aNumber
- self client send: '{"@type": "setAuthenticationPhoneNumber", "phone_number": "', aNumber, '"}'.
\ No newline at end of file
+ self client send: (TCCRequest
+ newWithType: 'setAuthenticationPhoneNumber'
+ from: {'phone_number' -> aNumber}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setDBEncryptionKey..st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setDBEncryptionKey..st
index 0f42e4552..be762792f 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setDBEncryptionKey..st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setDBEncryptionKey..st
@@ -1,4 +1,6 @@
-accessing
+library calls
setDBEncryptionKey: aString
- self client send: '{"@type": "checkDatabaseEncryptionKey", "encryption_key": "', aString, '"}'.
\ No newline at end of file
+ self client send: (TCCRequest
+ newWithType: 'checkDatabaseEncryptionKey'
+ from: {'encryption_key' -> aString}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setTDLibParams.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setTDLibParams.st
index d7e95c5de..359fc07ec 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setTDLibParams.st
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/setTDLibParams.st
@@ -1,14 +1,17 @@
-accessing
+library calls
setTDLibParams
- self client send: '{"@type": "setTdlibParameters", "parameters": {
- "database_directory": "tdlib",
- "use_message_database": true,
- "use_secret_chats": true,
- "api_id": 94575,
- "api_hash": "a3406de8d171bb422bb6ddf3bbd800e2",
- "system_language_code": "en",
- "device_model": "Desktop",
- "system_version": "', self client specificClient type, '",
- "application_version": "1.0",
- "enable_storage_optimizer": true}}'.
\ No newline at end of file
+ self client send: (TCCRequest
+ newWithType: 'setTdlibParameters'
+ from: {'parameters' -> (Dictionary newFrom: {
+ 'database_directory' -> 'tdlib'.
+ 'use_message_database' -> true.
+ 'use_secret_chats' -> true.
+ 'use_test_dc' -> self useTestDC.
+ 'api_id' -> self apiID.
+ 'api_hash' -> self apiHash.
+ 'system_language_code' -> 'en'.
+ 'device_model' -> 'Desktop'.
+ 'system_version' -> self client specificClient type.
+ 'application_version' -> '1.0'.
+ 'enable_storage_optimizer' -> true})}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/useTestDC.st b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/useTestDC.st
new file mode 100644
index 000000000..06527e7df
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/instance/useTestDC.st
@@ -0,0 +1,4 @@
+default values
+useTestDC
+
+ ^ false
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCAuthHandler.class/methodProperties.json
index 452a3f344..55cda3e16 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/methodProperties.json
@@ -2,20 +2,24 @@
"class" : {
},
"instance" : {
- "app" : "js 5/28/2020 17:02",
+ "apiHash" : "rs 6/14/2020 12:42",
+ "apiID" : "rs 6/14/2020 12:45",
+ "app" : "js 6/13/2020 18:12",
"app:" : "js 5/28/2020 17:02",
"authState" : "R.S 5/18/2020 17:54",
"authState:" : "R.S 5/18/2020 17:54",
- "checkAuthenticationCode:" : "R.S 5/19/2020 10:23",
+ "checkAuthenticationCode:" : "js 6/13/2020 18:31",
"client" : "js 5/28/2020 18:36",
- "handleEvent:" : "js 6/1/2020 15:04",
- "isAuthStateClosed" : "R.S 5/19/2020 10:29",
- "isAuthorizationStateReady" : "R.S 5/20/2020 16:59",
- "isAwaitingAuthCode" : "R.S 5/19/2020 10:30",
- "isAwaitingDBEncryptionKey" : "R.S 5/19/2020 10:28",
- "isAwaitingPhoneNumber" : "R.S 5/19/2020 10:28",
- "isAwaitingTDLibParams" : "R.S 5/19/2020 10:28",
- "logout" : "f.w. 6/3/2020 20:41",
- "sendPhoneNumber:" : "js 5/31/2020 20:09",
- "setDBEncryptionKey:" : "js 5/28/2020 17:04",
- "setTDLibParams" : "R.S 5/23/2020 12:22" } }
+ "handleEvent:" : "js 8/2/2020 12:54",
+ "initialize" : "r.s 7/13/2020 18:15",
+ "isAuthStateClosed" : "r.s 7/15/2020 12:17",
+ "isAuthorizationStateReady" : "r.s 7/15/2020 12:17",
+ "isAwaitingAuthCode" : "r.s 7/15/2020 12:17",
+ "isAwaitingDBEncryptionKey" : "r.s 7/15/2020 12:17",
+ "isAwaitingPhoneNumber" : "r.s 7/15/2020 12:17",
+ "isAwaitingTDLibParams" : "r.s 7/15/2020 12:17",
+ "logout" : "js 7/31/2020 14:13",
+ "sendPhoneNumber:" : "js 6/13/2020 18:54",
+ "setDBEncryptionKey:" : "rs 6/6/2020 16:26",
+ "setTDLibParams" : "rs 6/14/2020 12:42",
+ "useTestDC" : "rs 6/14/2020 12:40" } }
diff --git a/packages/TelegramClient-Core.package/TCCAuthHandler.class/properties.json b/packages/TelegramClient-Core.package/TCCAuthHandler.class/properties.json
index 67806a176..8a37f6f7c 100644
--- a/packages/TelegramClient-Core.package/TCCAuthHandler.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCAuthHandler.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:25",
"instvars" : [
"authState",
"app" ],
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/README.md b/packages/TelegramClient-Core.package/TCCChat.class/README.md
index e69de29bb..58b04e498 100644
--- a/packages/TelegramClient-Core.package/TCCChat.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCChat.class/README.md
@@ -0,0 +1 @@
+a Data Class for a single Chat
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/class/newFromNewChatEvent..st b/packages/TelegramClient-Core.package/TCCChat.class/class/newFromNewChatEvent..st
new file mode 100644
index 000000000..3c181d839
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/class/newFromNewChatEvent..st
@@ -0,0 +1,6 @@
+instance creation
+newFromNewChatEvent: anEvent
+
+ ^ self new
+ title: (anEvent at: 'title');
+ id: (anEvent at: 'id')
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/addNewestMessage..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/addNewestMessage..st
new file mode 100644
index 000000000..2b670619a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/addNewestMessage..st
@@ -0,0 +1,5 @@
+adding
+addNewestMessage: aMessage
+
+ self messages add: aMessage afterIndex: 1.
+ self triggerEvent: #newMessage with: aMessage.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/addOldestMessage..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/addOldestMessage..st
new file mode 100644
index 000000000..0745f89f8
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/addOldestMessage..st
@@ -0,0 +1,5 @@
+adding
+addOldestMessage: aMessage
+
+ self messages add: aMessage.
+ self triggerEvent: #newMessage with: aMessage.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/defaultNumberOfRequestedMessages.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/defaultNumberOfRequestedMessages.st
new file mode 100644
index 000000000..b61651516
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/defaultNumberOfRequestedMessages.st
@@ -0,0 +1,4 @@
+default values
+defaultNumberOfRequestedMessages
+
+ ^ 20
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/fullName..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/fullName..st
deleted file mode 100644
index b8ae47334..000000000
--- a/packages/TelegramClient-Core.package/TCCChat.class/instance/fullName..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-fullName: aString
-
- fullName := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/fullName.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/fullName.st
deleted file mode 100644
index 3e176ec3f..000000000
--- a/packages/TelegramClient-Core.package/TCCChat.class/instance/fullName.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-fullName
-
- ^ fullName
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/id..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/id..st
new file mode 100644
index 000000000..7a9230e8c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/id..st
@@ -0,0 +1,4 @@
+accessing
+id: aNumber
+
+ id := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/id.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/id.st
new file mode 100644
index 000000000..44798f6fa
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/id.st
@@ -0,0 +1,4 @@
+accessing
+id
+
+ ^ id
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/ifNotWaitingForUpdate..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/ifNotWaitingForUpdate..st
new file mode 100644
index 000000000..57299242f
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/ifNotWaitingForUpdate..st
@@ -0,0 +1,7 @@
+controlling
+ifNotWaitingForUpdate: aBlock
+
+ self waitingForUpdate ifTrue: [^ self].
+
+ self waitingForUpdate: true.
+ aBlock value.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/initialize.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/initialize.st
new file mode 100644
index 000000000..ba5d16410
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/initialize.st
@@ -0,0 +1,8 @@
+initialization
+initialize
+
+ self
+ title: '';
+ messages: (OrderedCollection newFrom: {TCCNullMessage new});
+ waitingForUpdate: false;
+ numberOfRequestedMessages: self defaultNumberOfRequestedMessages.
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage..st
new file mode 100644
index 000000000..322ca37f0
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage..st
@@ -0,0 +1,4 @@
+accessing
+lastMessage: aMessage
+
+ lastMessage := aMessage.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage.st
new file mode 100644
index 000000000..a4328f8e0
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage.st
@@ -0,0 +1,4 @@
+accessing
+lastMessage
+
+ ^ lastMessage
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfMessages.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfMessages.st
new file mode 100644
index 000000000..3100838b5
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfMessages.st
@@ -0,0 +1,4 @@
+accessing
+numberOfMessages
+
+ ^ self messages size - 1
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfRequestedMessages..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfRequestedMessages..st
new file mode 100644
index 000000000..5c9f8a4f8
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfRequestedMessages..st
@@ -0,0 +1,4 @@
+accessing
+numberOfRequestedMessages: aNumber
+
+ numberOfRequestedMessages := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfRequestedMessages.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfRequestedMessages.st
new file mode 100644
index 000000000..240cdd8c0
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/numberOfRequestedMessages.st
@@ -0,0 +1,4 @@
+accessing
+numberOfRequestedMessages
+
+ ^ numberOfRequestedMessages
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/order..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/order..st
index e9a4c7c57..3ea50be66 100644
--- a/packages/TelegramClient-Core.package/TCCChat.class/instance/order..st
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/order..st
@@ -1,3 +1,4 @@
accessing
-order: anObject
- order := anObject
\ No newline at end of file
+order: aNumber
+
+ order := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/order.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/order.st
index 2216237bd..029a7574f 100644
--- a/packages/TelegramClient-Core.package/TCCChat.class/instance/order.st
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/order.st
@@ -1,3 +1,4 @@
accessing
order
+
^ order
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/requestMessages..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/requestMessages..st
new file mode 100644
index 000000000..5d9693821
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/requestMessages..st
@@ -0,0 +1,4 @@
+accessing
+requestMessages: aLimit
+
+ self numberOfRequestedMessages: self numberOfMessages + aLimit
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/stillRequestedMessages.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/stillRequestedMessages.st
new file mode 100644
index 000000000..7f0da8be6
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/stillRequestedMessages.st
@@ -0,0 +1,4 @@
+accessing
+stillRequestedMessages
+
+ ^ self numberOfRequestedMessages - self numberOfMessages
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/title..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/title..st
new file mode 100644
index 000000000..b49b5a4aa
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/title..st
@@ -0,0 +1,4 @@
+accessing
+title: aString
+
+ title := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/title.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/title.st
new file mode 100644
index 000000000..3c1da9ab9
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/title.st
@@ -0,0 +1,4 @@
+accessing
+title
+
+ ^ title
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/userId..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/userId..st
deleted file mode 100644
index a0f685a4f..000000000
--- a/packages/TelegramClient-Core.package/TCCChat.class/instance/userId..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-userId: aString
-
- userId := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/userId.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/userId.st
deleted file mode 100644
index fdb89c4be..000000000
--- a/packages/TelegramClient-Core.package/TCCChat.class/instance/userId.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-userId
-
- ^ userId
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/waitingForUpdate..st b/packages/TelegramClient-Core.package/TCCChat.class/instance/waitingForUpdate..st
new file mode 100644
index 000000000..84ce6d485
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/waitingForUpdate..st
@@ -0,0 +1,4 @@
+accessing
+waitingForUpdate: aBoolean
+
+ waitingForUpdate := aBoolean.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/instance/waitingForUpdate.st b/packages/TelegramClient-Core.package/TCCChat.class/instance/waitingForUpdate.st
new file mode 100644
index 000000000..b1623ec82
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChat.class/instance/waitingForUpdate.st
@@ -0,0 +1,4 @@
+accessing
+waitingForUpdate
+
+ ^ waitingForUpdate
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCChat.class/methodProperties.json
index 3980f54db..141f4f7fc 100644
--- a/packages/TelegramClient-Core.package/TCCChat.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCChat.class/methodProperties.json
@@ -1,12 +1,26 @@
{
"class" : {
- },
+ "newFromNewChatEvent:" : "js 8/2/2020 22:26" },
"instance" : {
- "fullName" : "R.S 6/1/2020 15:36",
- "fullName:" : "R.S 6/1/2020 15:37",
+ "addNewestMessage:" : "js 8/2/2020 12:58",
+ "addOldestMessage:" : "js 8/2/2020 12:58",
+ "defaultNumberOfRequestedMessages" : "js 8/1/2020 18:52",
+ "id" : "rs 6/7/2020 22:20",
+ "id:" : "rs 6/7/2020 22:20",
+ "ifNotWaitingForUpdate:" : "js 8/2/2020 13:17",
+ "initialize" : "js 8/2/2020 17:33",
+ "lastMessage" : "rs 6/19/2020 17:33",
+ "lastMessage:" : "rs 6/19/2020 17:33",
"messages" : "R.S 6/1/2020 15:37",
"messages:" : "R.S 6/1/2020 15:37",
- "order" : "R.S 6/4/2020 09:56",
- "order:" : "R.S 6/4/2020 09:56",
- "userId" : "R.S 6/1/2020 15:37",
- "userId:" : "R.S 6/1/2020 15:37" } }
+ "numberOfMessages" : "js 8/1/2020 18:04",
+ "numberOfRequestedMessages" : "js 8/1/2020 17:43",
+ "numberOfRequestedMessages:" : "js 8/1/2020 17:43",
+ "order" : "js 6/13/2020 18:09",
+ "order:" : "js 6/13/2020 19:11",
+ "requestMessages:" : "js 8/1/2020 18:05",
+ "stillRequestedMessages" : "js 8/1/2020 18:05",
+ "title" : "rs 6/7/2020 22:24",
+ "title:" : "rs 6/7/2020 22:24",
+ "waitingForUpdate" : "js 8/1/2020 16:59",
+ "waitingForUpdate:" : "js 8/1/2020 17:00" } }
diff --git a/packages/TelegramClient-Core.package/TCCChat.class/properties.json b/packages/TelegramClient-Core.package/TCCChat.class/properties.json
index 56959b22e..86221496e 100644
--- a/packages/TelegramClient-Core.package/TCCChat.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCChat.class/properties.json
@@ -1,15 +1,18 @@
{
"category" : "TelegramClient-Core",
"classinstvars" : [
- ],
+ "userI" ],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:25",
"instvars" : [
- "userId",
- "fullName",
"messages",
- "order" ],
+ "order",
+ "id",
+ "title",
+ "lastMessage",
+ "waitingForUpdate",
+ "numberOfRequestedMessages" ],
"name" : "TCCChat",
"pools" : [
],
diff --git a/packages/TelegramClient-Core.package/TCCChats.class/README.md b/packages/TelegramClient-Core.package/TCCChats.class/README.md
new file mode 100644
index 000000000..b8bfb1660
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChats.class/README.md
@@ -0,0 +1 @@
+a sorted collection to keep the current chats in their right order
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChats.class/class/defaultSortBlock.st b/packages/TelegramClient-Core.package/TCCChats.class/class/defaultSortBlock.st
new file mode 100644
index 000000000..0dbd1d5d8
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChats.class/class/defaultSortBlock.st
@@ -0,0 +1,4 @@
+instance creation
+defaultSortBlock
+
+ ^ [:aChat :anotherChat | aChat order <= anotherChat order]
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChats.class/class/newWithDefaultSorting.st b/packages/TelegramClient-Core.package/TCCChats.class/class/newWithDefaultSorting.st
new file mode 100644
index 000000000..b52493f0b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChats.class/class/newWithDefaultSorting.st
@@ -0,0 +1,4 @@
+instance creation
+newWithDefaultSorting
+
+ ^ self sortBlock: self defaultSortBlock
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChats.class/instance/getChat..st b/packages/TelegramClient-Core.package/TCCChats.class/instance/getChat..st
new file mode 100644
index 000000000..bd37f04bd
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChats.class/instance/getChat..st
@@ -0,0 +1,4 @@
+accessing
+getChat: anID
+
+ ^ self detect: [:aChat | aChat id = anID]
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChats.class/instance/notify.st b/packages/TelegramClient-Core.package/TCCChats.class/instance/notify.st
new file mode 100644
index 000000000..d395cdb60
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChats.class/instance/notify.st
@@ -0,0 +1,6 @@
+events
+notify
+
+ self
+ reSort;
+ triggerEvent: #chatsListChanged.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChats.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCChats.class/methodProperties.json
new file mode 100644
index 000000000..62db0c04c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChats.class/methodProperties.json
@@ -0,0 +1,7 @@
+{
+ "class" : {
+ "defaultSortBlock" : "js 8/2/2020 13:29",
+ "newWithDefaultSorting" : "js 8/2/2020 13:29" },
+ "instance" : {
+ "getChat:" : "rs 6/19/2020 17:13",
+ "notify" : "js 7/31/2020 14:47" } }
diff --git a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/properties.json b/packages/TelegramClient-Core.package/TCCChats.class/properties.json
similarity index 60%
rename from packages/TelegramClient-Core.package/TCCTeleClientFactory.class/properties.json
rename to packages/TelegramClient-Core.package/TCCChats.class/properties.json
index ba8c21b1f..b1d225761 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCChats.class/properties.json
@@ -4,11 +4,11 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:26",
"instvars" : [
],
- "name" : "TCCTeleClientFactory",
+ "name" : "TCCChats",
"pools" : [
],
- "super" : "TCCAbstractTeleClientFactory",
+ "super" : "SortedCollection",
"type" : "normal" }
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/README.md b/packages/TelegramClient-Core.package/TCCChatsHandler.class/README.md
new file mode 100644
index 000000000..f85e6ec3d
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/README.md
@@ -0,0 +1 @@
+This handles event needed to work with chats and messages.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/addChat..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/addChat..st
new file mode 100644
index 000000000..fa98dee16
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/addChat..st
@@ -0,0 +1,14 @@
+events
+addChat: aChatEvent
+
+ | chat |
+
+ chat := TCCChat new
+ id: ((aChatEvent at: 'chat') at: 'id');
+ title: ((aChatEvent at: 'chat') at: 'title');
+ order: ((aChatEvent at: 'chat') at: 'order');
+ lastMessage: ''.
+
+ self app chats
+ add: chat;
+ notify.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/addNewMessage..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/addNewMessage..st
new file mode 100644
index 000000000..1cac69e66
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/addNewMessage..st
@@ -0,0 +1,9 @@
+events
+addNewMessage: aMessage
+
+ | message |
+
+ message := TCCMessage newFromMessageEvent: aMessage.
+
+ (self app chats getChat: message chatID) addNewestMessage: message.
+ self app triggerEvent: #newMessageReceived with: message.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/app..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/app..st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/app..st
rename to packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/app..st
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/app.st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/app.st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/app.st
rename to packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/app.st
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/chatHistoryReceived..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/chatHistoryReceived..st
new file mode 100644
index 000000000..6187050b3
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/chatHistoryReceived..st
@@ -0,0 +1,18 @@
+event handling
+chatHistoryReceived: aChatHistory
+
+ | chat chatID |
+
+ (aChatHistory at: 'messages') ifNotEmpty: [
+ chatID := (aChatHistory at: 'messages') first at: 'chat_id'.
+ chat := self app chats getChat: chatID.
+
+ (aChatHistory at: 'messages') do: [:message | chat addOldestMessage: (TCCMessage newFromMessageEvent: message)].
+
+ chat waitingForUpdate: false.
+
+ chat stillRequestedMessages > 0
+ ifTrue: [self
+ getChatHistoryFrom: chatID
+ with: chat messages last id
+ limit: chat stillRequestedMessages]].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/client.st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/client.st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/client.st
rename to packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/client.st
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/defaultMessageLimit.st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/defaultMessageLimit.st
new file mode 100644
index 000000000..5b8d6bbea
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/defaultMessageLimit.st
@@ -0,0 +1,4 @@
+default values
+defaultMessageLimit
+
+ ^ 20
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/getChatHistoryFrom.with.limit..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/getChatHistoryFrom.with.limit..st
new file mode 100644
index 000000000..929f8134b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/getChatHistoryFrom.with.limit..st
@@ -0,0 +1,16 @@
+library calls
+getChatHistoryFrom: aChatID with: aMessageId limit: aLimit
+
+ | chat |
+
+ chat := self app chats getChat: aChatID.
+ chat ifNotWaitingForUpdate: [
+ self client send: (TCCRequest
+ newWithType: 'getChatHistory'
+ from: {'chat_id' -> aChatID.
+ 'from_message_id' -> aMessageId.
+ 'offset' -> 0.
+ 'limit' -> aLimit.
+ 'only_local' -> false}).
+
+ chat requestMessages: aLimit].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/getChats.st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/getChats.st
new file mode 100644
index 000000000..479754f74
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/getChats.st
@@ -0,0 +1,8 @@
+library calls
+getChats
+
+ self client send: (TCCRequest
+ newWithType: 'getChats'
+ from: {
+ 'limit' -> 1000.
+ 'offset_order' -> '9223372036854775807'}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/handleNewMessage..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/handleNewMessage..st
new file mode 100644
index 000000000..6353d997c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/handleNewMessage..st
@@ -0,0 +1,8 @@
+event handling
+handleNewMessage: anEvent
+
+ | message |
+
+ message := anEvent at: 'message'.
+ ((message at: 'content') at: '@type') = 'messageText'
+ ifTrue: [self addNewMessage: message].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/openNewChat..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/openNewChat..st
new file mode 100644
index 000000000..e800c0cac
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/openNewChat..st
@@ -0,0 +1,4 @@
+events
+openNewChat: aChat
+
+ self app chats triggerEvent: #openNewChat with: (TCCChat newFromNewChatEvent: aChat).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/remainingMessages..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/remainingMessages..st
new file mode 100644
index 000000000..00cd3eaa1
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/remainingMessages..st
@@ -0,0 +1,4 @@
+accessing
+remainingMessages: aNumber
+
+ remainingMessages := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/remainingMessages.st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/remainingMessages.st
new file mode 100644
index 000000000..2174640b7
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/remainingMessages.st
@@ -0,0 +1,4 @@
+accessing
+remainingMessages
+
+ ^ remainingMessages
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/searchChat..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/searchChat..st
new file mode 100644
index 000000000..cd95e9c47
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/searchChat..st
@@ -0,0 +1,6 @@
+library calls
+searchChat: aUsername
+
+ self client send: (TCCRequest
+ newWithType: 'searchPublicChat'
+ from: {'username' -> aUsername}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/sendMessage.to..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/sendMessage.to..st
new file mode 100644
index 000000000..7468c617a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/sendMessage.to..st
@@ -0,0 +1,12 @@
+library calls
+sendMessage: aString to: aChatID
+
+ self client send: (TCCRequest
+ newWithType: 'sendMessage'
+ from: {
+ 'chat_id' -> aChatID.
+ 'input_message_content' -> (Dictionary newFrom: {
+ '@type' -> 'inputMessageText'.
+ 'text' -> (Dictionary newFrom: {
+ '@type' -> 'formattedText'.
+ 'text' -> aString asString squeakToUtf8})})}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/updateChatOrder..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/updateChatOrder..st
new file mode 100644
index 000000000..4ead35669
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/updateChatOrder..st
@@ -0,0 +1,7 @@
+event handling
+updateChatOrder: anEvent
+
+ (self app chats getChat: (anEvent at: 'chat_id'))
+ order: (anEvent at: 'order').
+
+ self app chats notify.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/updateLastMessage..st b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/updateLastMessage..st
new file mode 100644
index 000000000..44e3ad1cc
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/instance/updateLastMessage..st
@@ -0,0 +1,15 @@
+event handling
+updateLastMessage: anEvent
+
+ | content chat |
+
+ (anEvent includesKey: 'last_message') ifTrue: [
+ content := (anEvent at: 'last_message') at: 'content'.
+ chat := self app chats getChat: (anEvent at: 'chat_id').
+ chat order: (anEvent at: 'order').
+
+ (content at: '@type') = 'messageText'
+ ifTrue: [chat lastMessage: ((content at: 'text') at: 'text')]
+ ifFalse: [chat lastMessage: 'message type not supported yet'].
+
+ self app chats notify].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCChatsHandler.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCChatsHandler.class/methodProperties.json
new file mode 100644
index 000000000..498c29e84
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/methodProperties.json
@@ -0,0 +1,21 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "addChat:" : "js 8/2/2020 13:33",
+ "addNewMessage:" : "js 8/2/2020 12:58",
+ "app" : "js 6/1/2020 14:44",
+ "app:" : "js 6/1/2020 14:45",
+ "chatHistoryReceived:" : "js 8/2/2020 12:58",
+ "client" : "js 6/1/2020 14:44",
+ "defaultMessageLimit" : "js 8/1/2020 18:24",
+ "getChatHistoryFrom:with:limit:" : "js 8/2/2020 13:17",
+ "getChats" : "js 7/31/2020 22:50",
+ "handleNewMessage:" : "js 8/2/2020 21:12",
+ "openNewChat:" : "js 8/2/2020 22:27",
+ "remainingMessages" : "js 8/1/2020 16:49",
+ "remainingMessages:" : "js 8/1/2020 16:50",
+ "searchChat:" : "f.w. 7/15/2020 22:53",
+ "sendMessage:to:" : "js 7/31/2020 14:39",
+ "updateChatOrder:" : "js 8/1/2020 12:07",
+ "updateLastMessage:" : "js 8/2/2020 12:37" } }
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/properties.json b/packages/TelegramClient-Core.package/TCCChatsHandler.class/properties.json
similarity index 61%
rename from packages/TelegramClient-Core.package/TCCMessageHandler.class/properties.json
rename to packages/TelegramClient-Core.package/TCCChatsHandler.class/properties.json
index f8f7efa66..72b18d64e 100644
--- a/packages/TelegramClient-Core.package/TCCMessageHandler.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCChatsHandler.class/properties.json
@@ -4,10 +4,11 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:26",
"instvars" : [
- "app" ],
- "name" : "TCCMessageHandler",
+ "app",
+ "remainingMessages" ],
+ "name" : "TCCChatsHandler",
"pools" : [
],
"super" : "Object",
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/README.md b/packages/TelegramClient-Core.package/TCCCore.class/README.md
new file mode 100644
index 000000000..c1f61fa7b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/README.md
@@ -0,0 +1 @@
+The main component for the core, that handles incoming events.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/authHandler..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/authHandler..st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/authHandler..st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/authHandler..st
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/authHandler.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/authHandler.st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/authHandler.st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/authHandler.st
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/authSucceeded.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/authSucceeded.st
new file mode 100644
index 000000000..481c6745a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/authSucceeded.st
@@ -0,0 +1,6 @@
+events
+authSucceeded
+
+ self getOwnProfile.
+ self chatsHandler getChats.
+ ^ #authReady
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/chats..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/chats..st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/chats..st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/chats..st
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/chats.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/chats.st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/chats.st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/chats.st
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/chatsHandler..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/chatsHandler..st
new file mode 100644
index 000000000..4a7562a45
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/chatsHandler..st
@@ -0,0 +1,4 @@
+accessing
+chatsHandler: aChatsHandler
+
+ chatsHandler := aChatsHandler.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/chatsHandler.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/chatsHandler.st
new file mode 100644
index 000000000..af78b0d51
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/chatsHandler.st
@@ -0,0 +1,4 @@
+accessing
+chatsHandler
+
+ ^ chatsHandler
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/checkAuthenticationCode..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/checkAuthenticationCode..st
similarity index 89%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/checkAuthenticationCode..st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/checkAuthenticationCode..st
index 37675d345..8866d914c 100644
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/checkAuthenticationCode..st
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/checkAuthenticationCode..st
@@ -1,4 +1,4 @@
-accessing
+handlers
checkAuthenticationCode: aString
self authHandler checkAuthenticationCode: aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/client..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/client..st
new file mode 100644
index 000000000..a46f6fa10
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/client..st
@@ -0,0 +1,4 @@
+accessing
+client: aClient
+
+ client := aClient.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/client.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/client.st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/client.st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/client.st
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/getChatHistoryFrom..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/getChatHistoryFrom..st
new file mode 100644
index 000000000..c94ed4061
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/getChatHistoryFrom..st
@@ -0,0 +1,7 @@
+handlers
+getChatHistoryFrom: aChatID
+
+ self chatsHandler
+ getChatHistoryFrom: aChatID
+ with: (self chats getChat: aChatID) messages last id
+ limit: self chatsHandler defaultMessageLimit.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/getOwnProfile.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/getOwnProfile.st
new file mode 100644
index 000000000..8d312a5ec
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/getOwnProfile.st
@@ -0,0 +1,6 @@
+events
+getOwnProfile
+
+ self client send: (TCCRequest
+ newWithType: 'getMe'
+ from: {}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/handleEvent..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/handleEvent..st
new file mode 100644
index 000000000..c7eb279c4
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/handleEvent..st
@@ -0,0 +1,18 @@
+event handling
+handleEvent: anEvent
+
+ | update |
+ update := nil.
+ anEvent isError ifTrue: [self tryHandleError: anEvent].
+ anEvent type caseOf: {
+ ['updateAuthorizationState'] -> [update := self authHandler handleEvent: anEvent].
+ ['updateNewChat'] -> [self chatsHandler addChat: anEvent].
+ ['updateChatOrder'] -> [self chatsHandler updateChatOrder: anEvent].
+ ['updateChatLastMessage'] -> [self chatsHandler updateLastMessage: anEvent].
+ ['messages'] -> [self chatsHandler chatHistoryReceived: anEvent].
+ ['updateNewMessage'] -> [self chatsHandler handleNewMessage: anEvent].
+ ['user'] -> [self setUserID: anEvent].
+ ['chat'] -> [self chatsHandler openNewChat: anEvent]}
+ otherwise: [].
+
+ update isSymbol ifTrue: [self triggerEvent: update].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/initialize.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/initialize.st
new file mode 100644
index 000000000..4e2ef6da4
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/initialize.st
@@ -0,0 +1,10 @@
+initialization
+initialize
+
+ self
+ client: TCCTeleClient newForCurrentOS;
+ initializeHandlers;
+ chats: TCCChats newWithDefaultSorting;
+ loggedInUserID: 0.
+
+ [self receiveLoop] fork.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/initializeHandlers.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/initializeHandlers.st
new file mode 100644
index 000000000..3979eca30
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/initializeHandlers.st
@@ -0,0 +1,8 @@
+initialization
+initializeHandlers
+
+ self
+ authHandler: (TCCAuthHandler new
+ app: self);
+ chatsHandler: (TCCChatsHandler new
+ app: self).
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/isClientAlive.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/isClientAlive.st
similarity index 100%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/isClientAlive.st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/isClientAlive.st
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/loggedInUserID..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/loggedInUserID..st
new file mode 100644
index 000000000..9b83bb4a5
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/loggedInUserID..st
@@ -0,0 +1,4 @@
+accessing
+loggedInUserID: aNumber
+
+ loggedInUserID := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/loggedInUserID.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/loggedInUserID.st
new file mode 100644
index 000000000..f8dbff11a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/loggedInUserID.st
@@ -0,0 +1,4 @@
+accessing
+loggedInUserID
+
+ ^ loggedInUserID
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/receiveLoop.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/receiveLoop.st
similarity index 89%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/receiveLoop.st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/receiveLoop.st
index 18cc2b047..90977ca98 100644
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/receiveLoop.st
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/receiveLoop.st
@@ -1,4 +1,4 @@
-accessing
+events
receiveLoop
[self isClientAlive] whileTrue: [
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/searchChat..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/searchChat..st
new file mode 100644
index 000000000..cc53abc83
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/searchChat..st
@@ -0,0 +1,4 @@
+handlers
+searchChat: aUsername
+
+ self chatsHandler searchChat: aUsername.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/sendMessage.to..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/sendMessage.to..st
new file mode 100644
index 000000000..a9837420b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/sendMessage.to..st
@@ -0,0 +1,4 @@
+handlers
+sendMessage: aString to: aChatId
+
+ self chatsHandler sendMessage: aString to: aChatId.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/instance/sendPhoneNumber..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/sendPhoneNumber..st
similarity index 85%
rename from packages/TelegramClient-Core.package/TCCApp.class/instance/sendPhoneNumber..st
rename to packages/TelegramClient-Core.package/TCCCore.class/instance/sendPhoneNumber..st
index 001e28f4a..56d9a94a6 100644
--- a/packages/TelegramClient-Core.package/TCCApp.class/instance/sendPhoneNumber..st
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/sendPhoneNumber..st
@@ -1,4 +1,4 @@
-accessing
+handlers
sendPhoneNumber: aString
-
+
self authHandler sendPhoneNumber: aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/setUserID..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/setUserID..st
new file mode 100644
index 000000000..4130172b2
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/setUserID..st
@@ -0,0 +1,4 @@
+accessing
+setUserID: anUser
+
+ self loggedInUserID = 0 ifTrue: [self loggedInUserID: (anUser at: 'id')].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/tryHandleError..st b/packages/TelegramClient-Core.package/TCCCore.class/instance/tryHandleError..st
new file mode 100644
index 000000000..fd1b7e6df
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/tryHandleError..st
@@ -0,0 +1,12 @@
+error handling
+tryHandleError: anError
+
+ (anError at: 'message') caseOf: {
+ ['USERNAME_NOT_OCCUPIED'] -> [UIManager default inform: TCCErrorConstants unknownUsername].
+ ['USERNAME_INVALID'] -> [UIManager default inform: TCCErrorConstants unknownUsername].
+ ['PHONE_NUMBER_INVALID'] -> [UIManager default inform: TCCErrorConstants invalidAuthenticationCode].
+ ['PHONE_CODE_INVALID'] -> [UIManager default inform: TCCErrorConstants invalidAuthenticationCode]}
+ otherwise: [
+ ((anError at: 'message') beginsWith: 'Can''t lock file')
+ ifTrue: [UIManager default inform: TCCErrorConstants tdlibAlreadyInUse]
+ ifFalse: [self halt: 'An Error Occured. Check Transcript Output.']].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/instance/update.st b/packages/TelegramClient-Core.package/TCCCore.class/instance/update.st
new file mode 100644
index 000000000..c3c4283e0
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/instance/update.st
@@ -0,0 +1,7 @@
+events
+update
+
+ | event |
+
+ event := self client receive: 0.05.
+ event ifNotNil: [self handleEvent: (TCCEvent newFromTDLibEvent: event)].
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCCore.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCCore.class/methodProperties.json
new file mode 100644
index 000000000..188d22480
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCCore.class/methodProperties.json
@@ -0,0 +1,29 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "authHandler" : "R.S 5/20/2020 16:10",
+ "authHandler:" : "R.S 5/20/2020 16:10",
+ "authSucceeded" : "N.S. 7/31/2020 14:22",
+ "chats" : "R.S 6/1/2020 15:34",
+ "chats:" : "R.S 6/1/2020 15:34",
+ "chatsHandler" : "rs 6/7/2020 21:50",
+ "chatsHandler:" : "rs 6/7/2020 21:50",
+ "checkAuthenticationCode:" : "js 5/31/2020 20:10",
+ "client" : "R.S 5/20/2020 16:08",
+ "client:" : "js 6/13/2020 19:10",
+ "getChatHistoryFrom:" : "js 8/1/2020 18:19",
+ "getOwnProfile" : "N.S. 7/31/2020 14:22",
+ "handleEvent:" : "js 7/31/2020 22:34",
+ "initialize" : "js 8/2/2020 13:28",
+ "initializeHandlers" : "js 8/1/2020 18:09",
+ "isClientAlive" : "js 5/28/2020 17:18",
+ "loggedInUserID" : "rs 7/5/2020 14:48",
+ "loggedInUserID:" : "rs 7/5/2020 14:48",
+ "receiveLoop" : "R.S 6/1/2020 15:24",
+ "searchChat:" : "f.w. 7/15/2020 22:53",
+ "sendMessage:to:" : "rs 6/13/2020 15:26",
+ "sendPhoneNumber:" : "js 6/13/2020 15:35",
+ "setUserID:" : "js 8/2/2020 13:15",
+ "tryHandleError:" : "ct 10/7/2020 19:37",
+ "update" : "js 7/31/2020 22:34" } }
diff --git a/packages/TelegramClient-Core.package/TCCApp.class/properties.json b/packages/TelegramClient-Core.package/TCCCore.class/properties.json
similarity index 63%
rename from packages/TelegramClient-Core.package/TCCApp.class/properties.json
rename to packages/TelegramClient-Core.package/TCCCore.class/properties.json
index ca67e1af1..b171ad5e0 100644
--- a/packages/TelegramClient-Core.package/TCCApp.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCCore.class/properties.json
@@ -4,14 +4,14 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:24",
"instvars" : [
"client",
- "authUI",
"authHandler",
- "messageHandler",
- "chats" ],
- "name" : "TCCApp",
+ "chatsHandler",
+ "chats",
+ "loggedInUserID" ],
+ "name" : "TCCCore",
"pools" : [
],
"super" : "Object",
diff --git a/packages/TelegramClient-Core.package/TCCErrorConstants.class/README.md b/packages/TelegramClient-Core.package/TCCErrorConstants.class/README.md
new file mode 100644
index 000000000..d102006a6
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/README.md
@@ -0,0 +1 @@
+Contains error messages to be presented to the user.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/invalidAuthenticationCode.st b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/invalidAuthenticationCode.st
new file mode 100644
index 000000000..88ddf8c9c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/invalidAuthenticationCode.st
@@ -0,0 +1,4 @@
+messages
+invalidAuthenticationCode
+
+ ^ 'The authentication code you entered seems to be invalid.'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/invalidPhoneNumber.st b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/invalidPhoneNumber.st
new file mode 100644
index 000000000..f90dc4322
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/invalidPhoneNumber.st
@@ -0,0 +1,4 @@
+messages
+invalidPhoneNumber
+
+ ^ 'The phone number you entered seems to be invalid.'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/tdlibAlreadyInUse.st b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/tdlibAlreadyInUse.st
new file mode 100644
index 000000000..01a89eae7
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/tdlibAlreadyInUse.st
@@ -0,0 +1,4 @@
+messages
+tdlibAlreadyInUse
+
+ ^ 'An error seems to have occured while shutting down Telegram. Restart Telegram and your image to fix this error.'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/unknownUsername.st b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/unknownUsername.st
new file mode 100644
index 000000000..f54f31ee2
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/class/unknownUsername.st
@@ -0,0 +1,4 @@
+messages
+unknownUsername
+
+ ^ 'Username not assigned or invalid.'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCErrorConstants.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCErrorConstants.class/methodProperties.json
new file mode 100644
index 000000000..9effac684
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/methodProperties.json
@@ -0,0 +1,8 @@
+{
+ "class" : {
+ "invalidAuthenticationCode" : "r.s 7/31/2020 14:48",
+ "invalidPhoneNumber" : "r.s 7/31/2020 14:48",
+ "tdlibAlreadyInUse" : "r.s 7/31/2020 14:48",
+ "unknownUsername" : "r.s 7/31/2020 14:48" },
+ "instance" : {
+ } }
diff --git a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/properties.json b/packages/TelegramClient-Core.package/TCCErrorConstants.class/properties.json
similarity index 70%
rename from packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/properties.json
rename to packages/TelegramClient-Core.package/TCCErrorConstants.class/properties.json
index 6aa574007..7dc83fd5d 100644
--- a/packages/TelegramClient-Core.package/TCCAbstractTeleClientFactory.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCErrorConstants.class/properties.json
@@ -4,10 +4,10 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "N.S. 7/26/2020 17:49",
"instvars" : [
],
- "name" : "TCCAbstractTeleClientFactory",
+ "name" : "TCCErrorConstants",
"pools" : [
],
"super" : "Object",
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/README.md b/packages/TelegramClient-Core.package/TCCEvent.class/README.md
new file mode 100644
index 000000000..35ed31ebd
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/README.md
@@ -0,0 +1 @@
+data class for a event sent by tdlib
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/class/newFromTDLibEvent..st b/packages/TelegramClient-Core.package/TCCEvent.class/class/newFromTDLibEvent..st
new file mode 100644
index 000000000..f009f0a98
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/class/newFromTDLibEvent..st
@@ -0,0 +1,7 @@
+instance creation
+newFromTDLibEvent: anEvent
+
+ ^ (self newFrom: anEvent)
+ type: (anEvent at: '@type');
+ removeKey: '@type';
+ yourself
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/instance/isError.st b/packages/TelegramClient-Core.package/TCCEvent.class/instance/isError.st
new file mode 100644
index 000000000..63a76b1a1
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/instance/isError.st
@@ -0,0 +1,4 @@
+accessing
+isError
+
+ ^ self type = 'error' and: [(self at: 'code' ifAbsent: 0) = 400]
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/instance/type..st b/packages/TelegramClient-Core.package/TCCEvent.class/instance/type..st
new file mode 100644
index 000000000..1e77211e4
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/instance/type..st
@@ -0,0 +1,4 @@
+accessing
+type: aString
+
+ type := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/instance/type.st b/packages/TelegramClient-Core.package/TCCEvent.class/instance/type.st
new file mode 100644
index 000000000..95c8cb06f
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/instance/type.st
@@ -0,0 +1,4 @@
+accessing
+type
+
+ ^ type
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCEvent.class/methodProperties.json
new file mode 100644
index 000000000..96c057374
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/methodProperties.json
@@ -0,0 +1,7 @@
+{
+ "class" : {
+ "newFromTDLibEvent:" : "js 8/1/2020 12:07" },
+ "instance" : {
+ "isError" : "js 8/1/2020 12:32",
+ "type" : "js 7/31/2020 22:28",
+ "type:" : "js 7/31/2020 22:28" } }
diff --git a/packages/TelegramClient-Core.package/TCCEvent.class/properties.json b/packages/TelegramClient-Core.package/TCCEvent.class/properties.json
new file mode 100644
index 000000000..be7169e0d
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCEvent.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Core",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 8/1/2020 13:35",
+ "instvars" : [
+ "type" ],
+ "name" : "TCCEvent",
+ "pools" : [
+ ],
+ "super" : "Dictionary",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/README.md b/packages/TelegramClient-Core.package/TCCFFIClient.class/README.md
index e69de29bb..4e88de6ab 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/README.md
@@ -0,0 +1 @@
+This is a low-level class, that communicates directly with tdlib.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/class/downloadUrl.st b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/downloadUrl.st
new file mode 100644
index 000000000..56a5088a7
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/downloadUrl.st
@@ -0,0 +1,4 @@
+accessing
+downloadUrl
+
+ ^ self subclassResponsibility
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/class/fileName.st b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/fileName.st
new file mode 100644
index 000000000..1eb3ed312
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/fileName.st
@@ -0,0 +1,4 @@
+accessing
+fileName
+
+ ^ self subclassResponsibility
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/class/moduleName.st b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/moduleName.st
index e947bd38d..1e12ba429 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/class/moduleName.st
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/moduleName.st
@@ -1,4 +1,14 @@
accessing
moduleName
- ^ self subclassResponsibility
\ No newline at end of file
+ | filePath response |
+
+ filePath := FileDirectory default / self fileName.
+
+ filePath exists ifFalse: [
+ FileStream fileNamed: filePath fullName do: [:stream |
+ response := WebClient httpGet: self downloadUrl.
+ stream
+ binary;
+ nextPutAll: response content]].
+ ^ filePath fullName
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/class/newForCurrentOS.st b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/newForCurrentOS.st
new file mode 100644
index 000000000..18895a25c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/class/newForCurrentOS.st
@@ -0,0 +1,7 @@
+accessing
+newForCurrentOS
+
+ ^ Smalltalk platformName caseOf: {
+ ['Win32'] -> [TCCWindowsClient new].
+ ['Mac OS'] -> [TCCMacClient new].
+ ['unix'] -> [TCCLinuxClient new]}
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/create.st b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/create.st
index 4481e0998..73243e45d 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/create.st
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/create.st
@@ -1,5 +1,5 @@
-ExternalCalls
+external calls
create
-
+
^ self externalCallFailed
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/execute.with..st b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/execute.with..st
index 7baca2761..96ff1d302 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/execute.with..st
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/execute.with..st
@@ -1,5 +1,5 @@
-ExternalCalls
+external calls
execute: aHandle with: aMessage
-
+
^ self externalCallFailed
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/free..st b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/free..st
index 6e8ea2a49..e4134ec8c 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/free..st
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/free..st
@@ -1,5 +1,5 @@
-ExternalCalls
+external calls
free: aHandle
-
+
^ self externalCallFailed
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/receive.with..st b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/receive.with..st
index 9da9ae46b..bbc371c8d 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/receive.with..st
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/receive.with..st
@@ -1,5 +1,5 @@
-ExternalCalls
+external calls
receive: aHandle with: aTimeout
-
+
^ self externalCallFailed
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/send.with..st b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/send.with..st
index 4bf952b6b..fb1756e03 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/send.with..st
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/send.with..st
@@ -1,5 +1,5 @@
-ExternalCalls
+external calls
send: aHandle with: aMessage
-
+
^ self externalCallFailed
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/setLogLevel..st b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/setLogLevel..st
new file mode 100644
index 000000000..43465dff4
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/instance/setLogLevel..st
@@ -0,0 +1,5 @@
+external calls
+setLogLevel: aLogLevel
+
+
+ ^ self externalCallFailed
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCFFIClient.class/methodProperties.json
index 8939da4e6..e48719284 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/methodProperties.json
@@ -1,9 +1,13 @@
{
"class" : {
- "moduleName" : "js 5/14/2020 22:48" },
+ "downloadUrl" : "r.s 7/13/2020 17:05",
+ "fileName" : "r.s 7/13/2020 17:05",
+ "moduleName" : "js 8/2/2020 13:21",
+ "newForCurrentOS" : "js 8/7/2020 22:19" },
"instance" : {
- "create" : "js 5/28/2020 17:05",
- "execute:with:" : "js 5/28/2020 17:05",
- "free:" : "js 5/28/2020 17:05",
- "receive:with:" : "js 5/28/2020 17:05",
- "send:with:" : "js 5/28/2020 17:05" } }
+ "create" : "js 6/13/2020 12:53",
+ "execute:with:" : "js 6/13/2020 18:33",
+ "free:" : "js 6/13/2020 18:33",
+ "receive:with:" : "js 6/13/2020 18:33",
+ "send:with:" : "js 6/13/2020 18:33",
+ "setLogLevel:" : "N.S. 7/30/2020 17:22" } }
diff --git a/packages/TelegramClient-Core.package/TCCFFIClient.class/properties.json b/packages/TelegramClient-Core.package/TCCFFIClient.class/properties.json
index cb5eafb40..d2e63b1cc 100644
--- a/packages/TelegramClient-Core.package/TCCFFIClient.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCFFIClient.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:26",
"instvars" : [
],
"name" : "TCCFFIClient",
diff --git a/packages/TelegramClient-Core.package/TCCLinuxClient.class/README.md b/packages/TelegramClient-Core.package/TCCLinuxClient.class/README.md
index e69de29bb..e305b19da 100644
--- a/packages/TelegramClient-Core.package/TCCLinuxClient.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCLinuxClient.class/README.md
@@ -0,0 +1 @@
+implements the right binary name for Linux.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/downloadUrl.st b/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/downloadUrl.st
new file mode 100644
index 000000000..a685c5d3e
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/downloadUrl.st
@@ -0,0 +1,4 @@
+accessing
+downloadUrl
+
+ ^ 'https://drive.google.com/uc?export=download&id=11XxwhkjWBgavhKR9SNhOjk_0hchbBb_1'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/moduleName.st b/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/fileName.st
similarity index 75%
rename from packages/TelegramClient-Core.package/TCCLinuxClient.class/class/moduleName.st
rename to packages/TelegramClient-Core.package/TCCLinuxClient.class/class/fileName.st
index 3cb671f5e..dbbceee0c 100644
--- a/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/moduleName.st
+++ b/packages/TelegramClient-Core.package/TCCLinuxClient.class/class/fileName.st
@@ -1,4 +1,4 @@
accessing
-moduleName
+fileName
^ 'libtdjson.so.1.6.0'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCLinuxClient.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCLinuxClient.class/methodProperties.json
index 0abfa3add..b2ea3c306 100644
--- a/packages/TelegramClient-Core.package/TCCLinuxClient.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCLinuxClient.class/methodProperties.json
@@ -1,5 +1,6 @@
{
"class" : {
- "moduleName" : "js 5/14/2020 22:48" },
+ "downloadUrl" : "r.s 7/15/2020 19:27",
+ "fileName" : "r.s 7/13/2020 17:06" },
"instance" : {
- "type" : "R.S 5/14/2020 23:14" } }
+ "type" : "r.s 7/13/2020 17:31" } }
diff --git a/packages/TelegramClient-Core.package/TCCLinuxClient.class/properties.json b/packages/TelegramClient-Core.package/TCCLinuxClient.class/properties.json
index da092884c..d3dfb514a 100644
--- a/packages/TelegramClient-Core.package/TCCLinuxClient.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCLinuxClient.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:27",
"instvars" : [
],
"name" : "TCCLinuxClient",
diff --git a/packages/TelegramClient-Core.package/TCCMacClient.class/README.md b/packages/TelegramClient-Core.package/TCCMacClient.class/README.md
index e69de29bb..601cdcee9 100644
--- a/packages/TelegramClient-Core.package/TCCMacClient.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCMacClient.class/README.md
@@ -0,0 +1 @@
+implements the right binary name for Mac OS.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMacClient.class/class/downloadUrl.st b/packages/TelegramClient-Core.package/TCCMacClient.class/class/downloadUrl.st
new file mode 100644
index 000000000..3c74b63e0
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMacClient.class/class/downloadUrl.st
@@ -0,0 +1,4 @@
+accessing
+downloadUrl
+
+ ^ 'https://drive.google.com/uc?export=download&id=1MzMNvtY1Nc3Qu0oec-iviIhzOY7qr4x7'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMacClient.class/class/fileName.st b/packages/TelegramClient-Core.package/TCCMacClient.class/class/fileName.st
new file mode 100644
index 000000000..380e08459
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMacClient.class/class/fileName.st
@@ -0,0 +1,4 @@
+accessing
+fileName
+
+ ^ 'libtdjson.1.6.0.dylib'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMacClient.class/class/moduleName.st b/packages/TelegramClient-Core.package/TCCMacClient.class/class/moduleName.st
deleted file mode 100644
index a4ca21af4..000000000
--- a/packages/TelegramClient-Core.package/TCCMacClient.class/class/moduleName.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-moduleName
-
- ^ (FileDirectory default / 'libtdjson.1.6.0.dylib') fullName
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMacClient.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCMacClient.class/methodProperties.json
index 7dae93aad..2f0300313 100644
--- a/packages/TelegramClient-Core.package/TCCMacClient.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCMacClient.class/methodProperties.json
@@ -1,5 +1,6 @@
{
"class" : {
- "moduleName" : "js 5/28/2020 17:06" },
+ "downloadUrl" : "r.s 7/13/2020 17:06",
+ "fileName" : "r.s 7/13/2020 17:06" },
"instance" : {
- "type" : "js 5/28/2020 17:38" } }
+ "type" : "r.s 7/13/2020 17:31" } }
diff --git a/packages/TelegramClient-Core.package/TCCMacClient.class/properties.json b/packages/TelegramClient-Core.package/TCCMacClient.class/properties.json
index 127087cbe..0ea9e60e4 100644
--- a/packages/TelegramClient-Core.package/TCCMacClient.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCMacClient.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:27",
"instvars" : [
],
"name" : "TCCMacClient",
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/README.md b/packages/TelegramClient-Core.package/TCCMessage.class/README.md
new file mode 100644
index 000000000..58a4b6401
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/README.md
@@ -0,0 +1 @@
+represantation of a single text message in a chat
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/class/newFromMessageEvent..st b/packages/TelegramClient-Core.package/TCCMessage.class/class/newFromMessageEvent..st
new file mode 100644
index 000000000..9c6472b7c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/class/newFromMessageEvent..st
@@ -0,0 +1,11 @@
+instance creation
+newFromMessageEvent: aMessageEvent
+
+ ^ self new
+ message: (((aMessageEvent at: 'content') at: '@type') = 'messageText'
+ ifTrue: [((aMessageEvent at: 'content') at: 'text') at: 'text']
+ ifFalse: ['message type not supported yet']);
+ chatID: (aMessageEvent at: 'chat_id');
+ senderID: (aMessageEvent at: 'sender_user_id');
+ id: (aMessageEvent at: 'id');
+ isOutgoing: (aMessageEvent at: 'is_outgoing')
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/chatID..st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/chatID..st
new file mode 100644
index 000000000..014012231
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/chatID..st
@@ -0,0 +1,4 @@
+accessing
+chatID: aChatID
+
+ chatID := aChatID.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/chatID.st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/chatID.st
new file mode 100644
index 000000000..d732e5f82
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/chatID.st
@@ -0,0 +1,4 @@
+accessing
+chatID
+
+ ^ chatID
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/id..st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/id..st
new file mode 100644
index 000000000..7a9230e8c
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/id..st
@@ -0,0 +1,4 @@
+accessing
+id: aNumber
+
+ id := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/id.st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/id.st
new file mode 100644
index 000000000..44798f6fa
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/id.st
@@ -0,0 +1,4 @@
+accessing
+id
+
+ ^ id
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/initialize.st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/initialize.st
new file mode 100644
index 000000000..4ff3b2038
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/initialize.st
@@ -0,0 +1,6 @@
+accessing
+initialize
+
+ super initialize.
+
+ self message: ''.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/isOutgoing..st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/isOutgoing..st
new file mode 100644
index 000000000..edff07c5f
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/isOutgoing..st
@@ -0,0 +1,4 @@
+accessing
+isOutgoing: aBoolean
+
+ isOutgoing := aBoolean.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/isOutgoing.st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/isOutgoing.st
new file mode 100644
index 000000000..be9441a50
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/isOutgoing.st
@@ -0,0 +1,4 @@
+accessing
+isOutgoing
+
+ ^ isOutgoing
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/message..st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/message..st
new file mode 100644
index 000000000..7d27f20fe
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/message..st
@@ -0,0 +1,4 @@
+accessing
+message: aString
+
+ message := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/message.st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/message.st
new file mode 100644
index 000000000..d808932ce
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/message.st
@@ -0,0 +1,4 @@
+accessing
+message
+
+ ^ message
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/senderID..st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/senderID..st
new file mode 100644
index 000000000..9224139f1
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/senderID..st
@@ -0,0 +1,4 @@
+accessing
+senderID: aNumber
+
+ senderID := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/instance/senderID.st b/packages/TelegramClient-Core.package/TCCMessage.class/instance/senderID.st
new file mode 100644
index 000000000..8c0d6da28
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/instance/senderID.st
@@ -0,0 +1,4 @@
+accessing
+senderID
+
+ ^ senderID
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCMessage.class/methodProperties.json
new file mode 100644
index 000000000..a86268511
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/methodProperties.json
@@ -0,0 +1,15 @@
+{
+ "class" : {
+ "newFromMessageEvent:" : "js 8/2/2020 22:01" },
+ "instance" : {
+ "chatID" : "js 7/31/2020 15:14",
+ "chatID:" : "j 7/16/2020 12:03",
+ "id" : "js 8/1/2020 18:20",
+ "id:" : "js 8/1/2020 18:20",
+ "initialize" : "js 8/1/2020 18:18",
+ "isOutgoing" : "js 8/2/2020 22:00",
+ "isOutgoing:" : "js 8/2/2020 22:00",
+ "message" : "rs 6/29/2020 17:13",
+ "message:" : "js 8/2/2020 22:01",
+ "senderID" : "js 8/1/2020 18:21",
+ "senderID:" : "js 8/2/2020 22:00" } }
diff --git a/packages/TelegramClient-Core.package/TCCMessage.class/properties.json b/packages/TelegramClient-Core.package/TCCMessage.class/properties.json
new file mode 100644
index 000000000..5893b403a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCMessage.class/properties.json
@@ -0,0 +1,18 @@
+{
+ "category" : "TelegramClient-Core",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "f.w. 6/29/2020 17:05",
+ "instvars" : [
+ "message",
+ "chatID",
+ "id",
+ "senderID",
+ "isOutgoing" ],
+ "name" : "TCCMessage",
+ "pools" : [
+ ],
+ "super" : "Object",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/README.md b/packages/TelegramClient-Core.package/TCCMessageHandler.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/getChatInfos..st b/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/getChatInfos..st
deleted file mode 100644
index a361782f8..000000000
--- a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/getChatInfos..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-getChatInfos: aChatId
-
- self client send: '{"@type": "getChat", "chat_id": "', aChatId, '"}'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/getChats.st b/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/getChats.st
deleted file mode 100644
index bf5b35132..000000000
--- a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/getChats.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-getChats
-
- self client send: '{"@type": "getChats", "limit": "', 5, '", "offset_order": "', 9223372036854775807, '"}'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/handleEvent..st b/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/handleEvent..st
deleted file mode 100644
index 3befd0026..000000000
--- a/packages/TelegramClient-Core.package/TCCMessageHandler.class/instance/handleEvent..st
+++ /dev/null
@@ -1,4 +0,0 @@
-events
-handleEvent: anEvent
-
- "Transcript show: anEvent."
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCMessageHandler.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCMessageHandler.class/methodProperties.json
deleted file mode 100644
index b3fcb962d..000000000
--- a/packages/TelegramClient-Core.package/TCCMessageHandler.class/methodProperties.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "app" : "js 6/1/2020 14:44",
- "app:" : "js 6/1/2020 14:45",
- "client" : "js 6/1/2020 14:44",
- "getChatInfos:" : "R.S 6/1/2020 16:15",
- "getChats" : "js 6/1/2020 14:59",
- "handleEvent:" : "js 6/1/2020 16:37" } }
diff --git a/packages/TelegramClient-Core.package/TCCNullChat.class/README.md b/packages/TelegramClient-Core.package/TCCNullChat.class/README.md
new file mode 100644
index 000000000..141784493
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullChat.class/README.md
@@ -0,0 +1 @@
+a Chat, that does nothing and stands behind every other chat
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCNullChat.class/instance/id.st b/packages/TelegramClient-Core.package/TCCNullChat.class/instance/id.st
new file mode 100644
index 000000000..b6706c588
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullChat.class/instance/id.st
@@ -0,0 +1,4 @@
+accessing
+id
+
+ ^ -1
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCNullChat.class/instance/messages.st b/packages/TelegramClient-Core.package/TCCNullChat.class/instance/messages.st
new file mode 100644
index 000000000..60b7b3064
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullChat.class/instance/messages.st
@@ -0,0 +1,4 @@
+accessing
+messages
+
+ ^ OrderedCollection new
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCNullChat.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCNullChat.class/methodProperties.json
new file mode 100644
index 000000000..06e86a369
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullChat.class/methodProperties.json
@@ -0,0 +1,6 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "id" : "rs 6/17/2020 22:31",
+ "messages" : "rs 7/4/2020 19:17" } }
diff --git a/packages/TelegramClient-Core.package/TCCNullChat.class/properties.json b/packages/TelegramClient-Core.package/TCCNullChat.class/properties.json
new file mode 100644
index 000000000..9d1154c80
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullChat.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Core",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "rs 6/17/2020 23:11",
+ "instvars" : [
+ ],
+ "name" : "TCCNullChat",
+ "pools" : [
+ ],
+ "super" : "TCCChat",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Core.package/TCCNullMessage.class/README.md b/packages/TelegramClient-Core.package/TCCNullMessage.class/README.md
new file mode 100644
index 000000000..023baedb3
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullMessage.class/README.md
@@ -0,0 +1 @@
+a message, that is always the lowest message in a chat
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCNullMessage.class/instance/id.st b/packages/TelegramClient-Core.package/TCCNullMessage.class/instance/id.st
new file mode 100644
index 000000000..51f3c8d6b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullMessage.class/instance/id.st
@@ -0,0 +1,4 @@
+accessing
+id
+
+ ^ 0
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCNullMessage.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCNullMessage.class/methodProperties.json
new file mode 100644
index 000000000..9afaea71a
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullMessage.class/methodProperties.json
@@ -0,0 +1,5 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "id" : "js 8/1/2020 18:24" } }
diff --git a/packages/TelegramClient-Core.package/TCCNullMessage.class/properties.json b/packages/TelegramClient-Core.package/TCCNullMessage.class/properties.json
new file mode 100644
index 000000000..c9dd28db4
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCNullMessage.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Core",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 8/1/2020 18:29",
+ "instvars" : [
+ ],
+ "name" : "TCCNullMessage",
+ "pools" : [
+ ],
+ "super" : "TCCMessage",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/README.md b/packages/TelegramClient-Core.package/TCCRequest.class/README.md
new file mode 100644
index 000000000..3b4e5f098
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCRequest.class/README.md
@@ -0,0 +1 @@
+An Instance of this class represents a message to tdlib, can be build directly from a dictionary.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/class/newWithType.from..st b/packages/TelegramClient-Core.package/TCCRequest.class/class/newWithType.from..st
new file mode 100644
index 000000000..59174dc2b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCRequest.class/class/newWithType.from..st
@@ -0,0 +1,6 @@
+instance creation
+newWithType: aString from: aDictionary
+
+ ^ (self newFrom: aDictionary)
+ at: '@type' put: aString;
+ yourself
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/instance/asString.st b/packages/TelegramClient-Core.package/TCCRequest.class/instance/asString.st
new file mode 100644
index 000000000..ebfcc3f64
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCRequest.class/instance/asString.st
@@ -0,0 +1,9 @@
+converting
+asString
+
+ | aStream |
+
+ aStream := ReadWriteStream on: ''.
+ self jsonWriteOn: aStream.
+
+ ^ aStream contents
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json
new file mode 100644
index 000000000..54215ab10
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json
@@ -0,0 +1,5 @@
+{
+ "class" : {
+ "newWithType:from:" : "rs 6/6/2020 16:21" },
+ "instance" : {
+ "asString" : "js 8/1/2020 12:16" } }
diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/properties.json b/packages/TelegramClient-Core.package/TCCRequest.class/properties.json
new file mode 100644
index 000000000..7017c7b39
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCRequest.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Core",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 6/13/2020 16:28",
+ "instvars" : [
+ ],
+ "name" : "TCCRequest",
+ "pools" : [
+ ],
+ "super" : "Dictionary",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/README.md b/packages/TelegramClient-Core.package/TCCTeleClient.class/README.md
index e69de29bb..65911a185 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/README.md
@@ -0,0 +1 @@
+keeps a low-level client and a fitting handle
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/class/defaultLogLevel.st b/packages/TelegramClient-Core.package/TCCTeleClient.class/class/defaultLogLevel.st
new file mode 100644
index 000000000..8d4e9f45d
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/class/defaultLogLevel.st
@@ -0,0 +1,6 @@
+default values
+defaultLogLevel
+
+ "Log level is weird, 1 is fatal, 2 is critical, 3 is warning, 4 is default
+ and debug, but 5-1024 are also fair game"
+ ^ 2
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newForCurrentOS.st b/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newForCurrentOS.st
new file mode 100644
index 000000000..8112b597b
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newForCurrentOS.st
@@ -0,0 +1,4 @@
+instance creation
+newForCurrentOS
+
+ ^ self newWithClient: TCCFFIClient newForCurrentOS
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newWithClient..st b/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newWithClient..st
index ebfc67add..a59b7106d 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newWithClient..st
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/class/newWithClient..st
@@ -1,10 +1,7 @@
-as yet unclassified
-newWithClient: anActualClient
-
- | specificClient |
-
- specificClient := anActualClient create.
-
+instance creation
+newWithClient: aClient
+
+ aClient setLogLevel: self defaultLogLevel.
^ self new
- specificClient: anActualClient;
- handle: specificClient
\ No newline at end of file
+ specificClient: aClient;
+ handle: aClient create
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/execute..st b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/execute..st
index 924420f78..f3536103e 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/execute..st
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/execute..st
@@ -1,4 +1,4 @@
-accessing
+library calls
execute: aMessage
^ self specificClient execute: self handle with: aMessage
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/free.st b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/free.st
index 8989e1d3e..293ce6817 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/free.st
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/free.st
@@ -1,4 +1,4 @@
-accessing
+library calls
free
self specificClient free: self handle.
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/initialize..st b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/initialize..st
index f2a510061..4d1e2a0d0 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/initialize..st
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/initialize..st
@@ -1,4 +1,4 @@
-initialize-release
+initialization
initialize: anActualClient
self specificClient: anActualClient.
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/receive..st b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/receive..st
index 608b10a09..6ee78d3e3 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/receive..st
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/receive..st
@@ -1,9 +1,8 @@
-initialize-release
+library calls
receive: aTimeoutNumber
| event |
-
+
event := self specificClient receive: self handle with: aTimeoutNumber.
- event ifNil: [^nil].
-
+ event ifNil: [^ nil].
^ Json new readFromString: event
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/send..st b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/send..st
index 955ab8f9c..8a6da480c 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/send..st
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/instance/send..st
@@ -1,4 +1,4 @@
-accessing
-send: aMessage
+library calls
+send: aRequest
- self specificClient send: self handle with: aMessage.
\ No newline at end of file
+ self specificClient send: self handle with: aRequest asString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCTeleClient.class/methodProperties.json
index b102a63ef..d93c29260 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/methodProperties.json
@@ -1,6 +1,8 @@
{
"class" : {
- "newWithClient:" : "js 5/28/2020 17:13" },
+ "defaultLogLevel" : "js 8/2/2020 12:21",
+ "newForCurrentOS" : "js 8/7/2020 22:19",
+ "newWithClient:" : "js 8/7/2020 22:19" },
"instance" : {
"execute:" : "js 5/28/2020 17:23",
"free" : "js 5/28/2020 17:24",
@@ -8,7 +10,7 @@
"handle:" : "R.S 5/18/2020 18:20",
"initialize:" : "R.S 5/20/2020 16:10",
"isAlive" : "js 5/28/2020 17:23",
- "receive:" : "R.S 5/18/2020 18:12",
- "send:" : "js 5/28/2020 17:24",
+ "receive:" : "js 6/13/2020 19:13",
+ "send:" : "rs 6/6/2020 16:09",
"specificClient" : "js 5/28/2020 17:23",
"specificClient:" : "js 5/28/2020 17:23" } }
diff --git a/packages/TelegramClient-Core.package/TCCTeleClient.class/properties.json b/packages/TelegramClient-Core.package/TCCTeleClient.class/properties.json
index 0b0794346..945f557cd 100644
--- a/packages/TelegramClient-Core.package/TCCTeleClient.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCTeleClient.class/properties.json
@@ -4,10 +4,9 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:37",
"instvars" : [
"handle",
- "authHandler",
"specificClient" ],
"name" : "TCCTeleClient",
"pools" : [
diff --git a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/README.md b/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/instance/createClient..st b/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/instance/createClient..st
deleted file mode 100644
index 222f503d5..000000000
--- a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/instance/createClient..st
+++ /dev/null
@@ -1,8 +0,0 @@
-Creation
-createClient: anOsName
-
- ^ (anOsName startsWith: 'Win32')
- ifTrue: [TCCWindowsClient new]
- ifFalse: [(anOsName startsWith: 'Mac OS')
- ifTrue: [TCCMacClient new]
- ifFalse: [TCCLinuxClient new]]
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/instance/createClient.st b/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/instance/createClient.st
deleted file mode 100644
index 2731b84f0..000000000
--- a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/instance/createClient.st
+++ /dev/null
@@ -1,4 +0,0 @@
-Creation
-createClient
-
- ^ self createClient: Smalltalk platformName
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/methodProperties.json
deleted file mode 100644
index 9df611ecf..000000000
--- a/packages/TelegramClient-Core.package/TCCTeleClientFactory.class/methodProperties.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "createClient" : "js 5/28/2020 18:02",
- "createClient:" : "js 5/28/2020 17:08" } }
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/README.md b/packages/TelegramClient-Core.package/TCCWindowsClient.class/README.md
index e69de29bb..1d790accf 100644
--- a/packages/TelegramClient-Core.package/TCCWindowsClient.class/README.md
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/README.md
@@ -0,0 +1 @@
+implements the right binary name for Windows.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/downloadArchive.st b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/downloadArchive.st
new file mode 100644
index 000000000..e92a84887
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/downloadArchive.st
@@ -0,0 +1,14 @@
+helper
+downloadArchive
+
+ | intermediatePath archive response |
+ intermediatePath := FileDirectory default / 'archive.zip'.
+ FileStream fileNamed: intermediatePath fullName do: [:stream |
+ response := WebClient httpGet: self downloadUrl.
+ stream
+ binary;
+ nextPutAll: response content].
+ archive := ZipArchive new readFrom: (intermediatePath fullName).
+ archive extractAllTo: FileDirectory default.
+ archive close.
+ intermediatePath delete.
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/downloadUrl.st b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/downloadUrl.st
new file mode 100644
index 000000000..caed2316d
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/downloadUrl.st
@@ -0,0 +1,4 @@
+accessing
+downloadUrl
+
+ ^ 'https://drive.google.com/u/0/uc?id=1dVuTo2A_pl12-wj5OEolafMRxC_GLeGk&export=download'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/fileName.st b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/fileName.st
new file mode 100644
index 000000000..1c5948334
--- /dev/null
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/fileName.st
@@ -0,0 +1,4 @@
+accessing
+fileName
+
+ ^ 'tdjson.dll'
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/moduleName.st b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/moduleName.st
index 0182c3c98..b841d6680 100644
--- a/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/moduleName.st
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/class/moduleName.st
@@ -1,4 +1,10 @@
accessing
moduleName
- ^ 'tdjson'
\ No newline at end of file
+ | filePath |
+
+ filePath := FileDirectory default / self fileName.
+
+ filePath exists ifFalse: [self downloadArchive].
+
+ ^ filePath fullName
\ No newline at end of file
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCWindowsClient.class/methodProperties.json
index 5f714595d..0c2a3b502 100644
--- a/packages/TelegramClient-Core.package/TCCWindowsClient.class/methodProperties.json
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/methodProperties.json
@@ -1,5 +1,8 @@
{
"class" : {
- "moduleName" : "js 5/14/2020 22:48" },
+ "downloadArchive" : "js 8/2/2020 13:23",
+ "downloadUrl" : "N.S. 7/23/2020 12:45",
+ "fileName" : "f.w. 7/15/2020 22:04",
+ "moduleName" : "js 8/2/2020 13:21" },
"instance" : {
- "type" : "js 5/28/2020 17:38" } }
+ "type" : "r.s 7/13/2020 17:31" } }
diff --git a/packages/TelegramClient-Core.package/TCCWindowsClient.class/properties.json b/packages/TelegramClient-Core.package/TCCWindowsClient.class/properties.json
index e12f9356e..d105e98f7 100644
--- a/packages/TelegramClient-Core.package/TCCWindowsClient.class/properties.json
+++ b/packages/TelegramClient-Core.package/TCCWindowsClient.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:27",
"instvars" : [
],
"name" : "TCCWindowsClient",
diff --git a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/README.md b/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/instance/createClient..st b/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/instance/createClient..st
deleted file mode 100644
index 7f0ffe1f3..000000000
--- a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/instance/createClient..st
+++ /dev/null
@@ -1,4 +0,0 @@
-creation
-createClient: anOsName
-
- ^ TCTFFIClientMock new
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/methodProperties.json
deleted file mode 100644
index d5beb0b81..000000000
--- a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/methodProperties.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "createClient:" : "js 5/28/2020 17:46" } }
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/README.md b/packages/TelegramClient-Tests.package/TCTAuthTests.class/README.md
new file mode 100644
index 000000000..0f287ef5f
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/README.md
@@ -0,0 +1 @@
+This class tests auth behaviour
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUApp.class/instance/core..st b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/core..st
similarity index 100%
rename from TelegramClient-UI.package/TCUApp.class/instance/core..st
rename to packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/core..st
diff --git a/TelegramClient-UI.package/TCUApp.class/instance/core.st b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/core.st
similarity index 100%
rename from TelegramClient-UI.package/TCUApp.class/instance/core.st
rename to packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/core.st
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/setUp.st b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/setUp.st
new file mode 100644
index 000000000..d238ff19e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/setUp.st
@@ -0,0 +1,9 @@
+running
+setUp
+
+ self core: TCTTestCore new.
+ 1 seconds wait.
+ self core authHandler isAuthorizationStateReady ifTrue: [self core authHandler logout.
+ 1 seconds wait.
+ self core: TCTTestCore new.
+ 1 seconds wait].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/tearDown.st b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/tearDown.st
new file mode 100644
index 000000000..c5bb8da1e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/tearDown.st
@@ -0,0 +1,4 @@
+running
+tearDown
+
+ self core client free.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateIsAwaitingPhoneNumber.st b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateIsAwaitingPhoneNumber.st
new file mode 100644
index 000000000..86ed8ec44
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateIsAwaitingPhoneNumber.st
@@ -0,0 +1,4 @@
+testing
+testAuthStateIsAwaitingPhoneNumber
+
+ self assert: self core authHandler isAwaitingPhoneNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateReady.st b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateReady.st
new file mode 100644
index 000000000..bf26e0f93
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateReady.st
@@ -0,0 +1,6 @@
+testing
+testAuthStateReady
+
+ self core loginWithTestData.
+ 2 seconds wait.
+ self assert: self core authHandler isAuthorizationStateReady.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTAuthTests.class/methodProperties.json
new file mode 100644
index 000000000..641c0eff6
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/methodProperties.json
@@ -0,0 +1,10 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "core" : "r.s 7/15/2020 12:39",
+ "core:" : "r.s 7/15/2020 12:39",
+ "setUp" : "r.s 7/15/2020 19:25",
+ "tearDown" : "r.s 7/15/2020 19:29",
+ "testAuthStateIsAwaitingPhoneNumber" : "r.s 7/15/2020 19:24",
+ "testAuthStateReady" : "r.s 7/15/2020 19:23" } }
diff --git a/packages/TelegramClient-Tests.package/TCTAuthTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTAuthTests.class/properties.json
new file mode 100644
index 000000000..b3f36524d
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTAuthTests.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "r.s 7/15/2020 19:22",
+ "instvars" : [
+ "core" ],
+ "name" : "TCTAuthTests",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/README.md b/packages/TelegramClient-Tests.package/TCTChatTests.class/README.md
new file mode 100644
index 000000000..70d139d46
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/README.md
@@ -0,0 +1 @@
+This Class tests the behavoir of TCCChat and TCCChats
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/chat..st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/chat..st
new file mode 100644
index 000000000..ea88f7a94
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/chat..st
@@ -0,0 +1,4 @@
+accessing
+chat: aTCCChat
+
+ chat := aTCCChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/chat.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/chat.st
new file mode 100644
index 000000000..207f37ad7
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/chat.st
@@ -0,0 +1,4 @@
+accessing
+chat
+
+ ^ chat
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/setUp.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/setUp.st
new file mode 100644
index 000000000..4795f55b3
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/setUp.st
@@ -0,0 +1,11 @@
+running
+setUp
+
+ self chat: TCCChat new.
+
+ 1 to: 5 do: [:aNumber |
+ self chat messages add: (TCCMessage new
+ message: aNumber asString;
+ chatID: aNumber * 2;
+ senderID: aNumber * 3;
+ id: aNumber * 4)].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testAddNewestMessage.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testAddNewestMessage.st
new file mode 100644
index 000000000..fdd38a093
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testAddNewestMessage.st
@@ -0,0 +1,5 @@
+testing
+testAddNewestMessage
+
+ self chat addNewestMessage: (TCCMessage new message: 'test').
+ self assert: self chat messages second message equals: 'test'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testAddOldestMessage.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testAddOldestMessage.st
new file mode 100644
index 000000000..e36f2060a
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testAddOldestMessage.st
@@ -0,0 +1,5 @@
+testing
+testAddOldestMessage
+
+ self chat addOldestMessage: (TCCMessage new message: 'test').
+ self assert: self chat messages last message equals: 'test'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testID.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testID.st
new file mode 100644
index 000000000..33b911bad
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testID.st
@@ -0,0 +1,5 @@
+testing
+testID
+
+ self chat id: 15.
+ self assert: self chat id equals: 15.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testLastMessage.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testLastMessage.st
new file mode 100644
index 000000000..226a01f23
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testLastMessage.st
@@ -0,0 +1,5 @@
+testing
+testLastMessage
+
+ self chat lastMessage: 'test'.
+ self assert: self chat lastMessage equals: 'test'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessage.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessage.st
new file mode 100644
index 000000000..a8dec63b8
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessage.st
@@ -0,0 +1,18 @@
+testing
+testMessage
+
+ | message |
+
+ message := TCCMessage newFromMessageEvent: (TCCEvent newFromTDLibEvent: (Dictionary newFrom: {
+ '@type' -> 'message'.
+ 'chat_id' -> '1'.
+ 'sender_user_id' -> '2'.
+ 'id' -> '3'.
+ 'is_outgoing' -> false.
+ 'content' -> (Dictionary newFrom: {
+ '@type' -> 'messageText'.
+ 'text' -> (Dictionary newFrom: {
+ 'text' -> 'testText'})})})).
+
+ self assert: message senderID equals: '2'.
+ self assert: message id equals: '3'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessages.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessages.st
new file mode 100644
index 000000000..12d2b51ba
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessages.st
@@ -0,0 +1,9 @@
+testing
+testMessages
+
+ | collection |
+
+ collection := OrderedCollection newFrom: {TCCMessage new. TCCMessage new}.
+
+ self chat messages: collection.
+ self assert: self chat messages equals: collection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessagesSize.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessagesSize.st
new file mode 100644
index 000000000..f7a564423
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testMessagesSize.st
@@ -0,0 +1,4 @@
+testing
+testMessagesSize
+
+ self assert: self chat numberOfMessages equals: 5.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullID.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullID.st
new file mode 100644
index 000000000..36923b26b
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullID.st
@@ -0,0 +1,4 @@
+testing
+testNullID
+
+ self assert: TCCNullChat new id isNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullMessage.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullMessage.st
new file mode 100644
index 000000000..0e0ac3215
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullMessage.st
@@ -0,0 +1,4 @@
+testing
+testNullMessage
+
+ self assert: TCCNullMessage new id isNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullMessages.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullMessages.st
new file mode 100644
index 000000000..b7e74a71f
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testNullMessages.st
@@ -0,0 +1,4 @@
+testing
+testNullMessages
+
+ self assert: TCCNullChat new messages isCollection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testOrder.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testOrder.st
new file mode 100644
index 000000000..5d2ba63a7
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testOrder.st
@@ -0,0 +1,5 @@
+testing
+testOrder
+
+ self chat order: 5.
+ self assert: self chat order equals: 5.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testStillRequestedMessages.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testStillRequestedMessages.st
new file mode 100644
index 000000000..57cb83cea
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testStillRequestedMessages.st
@@ -0,0 +1,12 @@
+testing
+testStillRequestedMessages
+
+ self chat numberOfRequestedMessages: 10.
+
+ self assert: self chat stillRequestedMessages equals: 5.
+
+ self chat requestMessages: 20.
+ self assert: self chat stillRequestedMessages equals: 20.
+
+ self chat addOldestMessage: TCCMessage new.
+ self assert: self chat stillRequestedMessages equals: 19.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testTitle.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testTitle.st
new file mode 100644
index 000000000..ff53dae9d
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testTitle.st
@@ -0,0 +1,5 @@
+testing
+testTitle
+
+ self chat title: 'testing'.
+ self assert: self chat title equals: 'testing'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testWaitingForUpdate.st b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testWaitingForUpdate.st
new file mode 100644
index 000000000..4430d08c0
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/instance/testWaitingForUpdate.st
@@ -0,0 +1,14 @@
+testing
+testWaitingForUpdate
+
+ | marker |
+ self assert: self chat waitingForUpdate not.
+
+ marker := false.
+ self chat ifNotWaitingForUpdate: [marker := true].
+ self assert: marker.
+ self assert: self chat waitingForUpdate.
+
+ marker := false.
+ self chat ifNotWaitingForUpdate: [marker := true].
+ self assert: marker not.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTChatTests.class/methodProperties.json
new file mode 100644
index 000000000..4a6d34fd9
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/methodProperties.json
@@ -0,0 +1,21 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "chat" : "LL 8/2/2020 20:25",
+ "chat:" : "LL 8/2/2020 20:26",
+ "setUp" : "js 8/2/2020 20:44",
+ "testAddNewestMessage" : "js 8/2/2020 22:48",
+ "testAddOldestMessage" : "js 8/2/2020 20:47",
+ "testID" : "js 8/2/2020 21:03",
+ "testLastMessage" : "js 8/2/2020 21:04",
+ "testMessage" : "js 8/2/2020 22:53",
+ "testMessages" : "js 8/2/2020 21:06",
+ "testMessagesSize" : "js 8/2/2020 20:48",
+ "testNullID" : "js 8/2/2020 21:15",
+ "testNullMessage" : "js 8/2/2020 21:41",
+ "testNullMessages" : "js 8/2/2020 21:17",
+ "testOrder" : "js 8/2/2020 21:06",
+ "testStillRequestedMessages" : "js 8/2/2020 21:02",
+ "testTitle" : "js 8/2/2020 21:06",
+ "testWaitingForUpdate" : "js 8/2/2020 20:58" } }
diff --git a/packages/TelegramClient-Tests.package/TCTChatTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTChatTests.class/properties.json
new file mode 100644
index 000000000..36c8af059
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatTests.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 7/31/2020 21:29",
+ "instvars" : [
+ "chat" ],
+ "name" : "TCTChatTests",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/README.md b/packages/TelegramClient-Tests.package/TCTChatsTests.class/README.md
new file mode 100644
index 000000000..70d139d46
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/README.md
@@ -0,0 +1 @@
+This Class tests the behavoir of TCCChat and TCCChats
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/chats..st b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/chats..st
new file mode 100644
index 000000000..1b7acbc96
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/chats..st
@@ -0,0 +1,4 @@
+accessing
+chats: aTCCChats
+
+ chats := aTCCChats.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/chats.st b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/chats.st
new file mode 100644
index 000000000..2ce278459
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/chats.st
@@ -0,0 +1,4 @@
+accessing
+chats
+
+ ^ chats
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/setUp.st b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/setUp.st
new file mode 100644
index 000000000..c2ca84f8a
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/setUp.st
@@ -0,0 +1,7 @@
+running
+setUp
+
+ self chats: TCCChats newWithDefaultSorting.
+ 1 to: 3 do: [:aNumber | self chats add: (TCCChat new
+ id: aNumber;
+ order: aNumber)].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/testOrderInsert.st b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/testOrderInsert.st
new file mode 100644
index 000000000..4ea1f5fa4
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/testOrderInsert.st
@@ -0,0 +1,8 @@
+testing
+testOrderInsert
+
+ self chats add: (TCCChat new
+ id: 0;
+ order: 0).
+
+ self assert: self chats first id equals: 0.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/testOrderModify.st b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/testOrderModify.st
new file mode 100644
index 000000000..81a966e20
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/instance/testOrderModify.st
@@ -0,0 +1,11 @@
+testing
+testOrderModify
+
+ | chat |
+
+ chat := self chats first.
+ chat order: 6.
+
+ self chats notify.
+
+ self assert: self chats last id equals: 1.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTChatsTests.class/methodProperties.json
new file mode 100644
index 000000000..a79ec3ded
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/methodProperties.json
@@ -0,0 +1,9 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "chats" : "LL 7/31/2020 15:25",
+ "chats:" : "js 7/31/2020 21:31",
+ "setUp" : "js 8/2/2020 14:43",
+ "testOrderInsert" : "js 8/2/2020 14:39",
+ "testOrderModify" : "js 8/2/2020 14:39" } }
diff --git a/packages/TelegramClient-Tests.package/TCTChatsTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTChatsTests.class/properties.json
new file mode 100644
index 000000000..6a08e477c
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTChatsTests.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 7/31/2020 21:29",
+ "instvars" : [
+ "chats" ],
+ "name" : "TCTChatsTests",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTClientTests.class/README.md b/packages/TelegramClient-Tests.package/TCTClientTests.class/README.md
new file mode 100644
index 000000000..862812c9d
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTClientTests.class/README.md
@@ -0,0 +1 @@
+tests FFIClients and TeleClient
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTClientTests.class/instance/testClientConstants.st b/packages/TelegramClient-Tests.package/TCTClientTests.class/instance/testClientConstants.st
new file mode 100644
index 000000000..ff856be5e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTClientTests.class/instance/testClientConstants.st
@@ -0,0 +1,6 @@
+testing
+testClientConstants
+
+ {TCCLinuxClient . TCCWindowsClient . TCCMacClient} do: [:aClientClass |
+ self assert: aClientClass downloadUrl isString.
+ self assert: aClientClass fileName isString].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/instance/testClientDestroysHandle.st b/packages/TelegramClient-Tests.package/TCTClientTests.class/instance/testClientDestroysHandle.st
similarity index 58%
rename from packages/TelegramClient-Tests.package/TCTTeleClientTests.class/instance/testClientDestroysHandle.st
rename to packages/TelegramClient-Tests.package/TCTClientTests.class/instance/testClientDestroysHandle.st
index 46eaf4c85..b205397d7 100644
--- a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/instance/testClientDestroysHandle.st
+++ b/packages/TelegramClient-Tests.package/TCTClientTests.class/instance/testClientDestroysHandle.st
@@ -1,12 +1,11 @@
-client
+testing
testClientDestroysHandle
-
- | aClient aHandle aMock |
- aMock := TCTAbstractTeleClientFactoryMock new createClient: ''.
+
+ | aClient aMock |
+ aMock := TCTFFIClientMock new.
aClient := TCCTeleClient newWithClient: aMock.
aClient free.
- aHandle := aClient specificClient.
-
+
self assert: aClient isAlive not.
self assert: aClient specificClient isNil.
self assert: aMock freed.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTClientTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTClientTests.class/methodProperties.json
new file mode 100644
index 000000000..f7d4a4b41
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTClientTests.class/methodProperties.json
@@ -0,0 +1,6 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "testClientConstants" : "js 8/2/2020 21:34",
+ "testClientDestroysHandle" : "js 8/2/2020 12:25" } }
diff --git a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTClientTests.class/properties.json
similarity index 70%
rename from packages/TelegramClient-Tests.package/TCTTeleClientTests.class/properties.json
rename to packages/TelegramClient-Tests.package/TCTClientTests.class/properties.json
index daaaeef98..de33d39ea 100644
--- a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/properties.json
+++ b/packages/TelegramClient-Tests.package/TCTClientTests.class/properties.json
@@ -4,10 +4,10 @@
],
"classvars" : [
],
- "commentStamp" : "N.S. 5/14/2020 11:47",
+ "commentStamp" : "js 8/2/2020 12:25",
"instvars" : [
],
- "name" : "TCTTeleClientTests",
+ "name" : "TCTClientTests",
"pools" : [
],
"super" : "TestCase",
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/README.md b/packages/TelegramClient-Tests.package/TCTCoreTests.class/README.md
new file mode 100644
index 000000000..96fe56be1
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/README.md
@@ -0,0 +1 @@
+tests TCCCore and some Handlers
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/core..st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/core..st
new file mode 100644
index 000000000..27523eab2
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/core..st
@@ -0,0 +1,4 @@
+accessing
+core: aTCCCore
+
+ core := aTCCCore.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/core.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/core.st
similarity index 66%
rename from TelegramClient-UI.package/TCUMain.class/instance/core.st
rename to packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/core.st
index 22ede7f56..7652dd8d1 100644
--- a/TelegramClient-UI.package/TCUMain.class/instance/core.st
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/core.st
@@ -1,4 +1,4 @@
accessing
core
- ^ core
+ ^ core
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/setUp.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/setUp.st
new file mode 100644
index 000000000..9813ea784
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/setUp.st
@@ -0,0 +1,4 @@
+running
+setUp
+
+ self core: TCCCore new.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/tearDown.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/tearDown.st
new file mode 100644
index 000000000..c5bb8da1e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/tearDown.st
@@ -0,0 +1,4 @@
+running
+tearDown
+
+ self core client free.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testAuthConstants.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testAuthConstants.st
new file mode 100644
index 000000000..cb8c8c16d
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testAuthConstants.st
@@ -0,0 +1,6 @@
+testing
+testAuthConstants
+
+ self assert: TCCAuthHandler new useTestDC not.
+ self assert: TCCAuthHandler new apiHash isString.
+ self assert: TCCAuthHandler new apiID isString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testAuthHandler.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testAuthHandler.st
new file mode 100644
index 000000000..5ff7672b2
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testAuthHandler.st
@@ -0,0 +1,8 @@
+testing
+testAuthHandler
+
+ | authHandler |
+ authHandler := TCCAuthHandler new.
+ self core authHandler: authHandler.
+
+ self assert: (self core authHandler) equals: authHandler.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testChatsHandler.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testChatsHandler.st
new file mode 100644
index 000000000..0b910ab37
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testChatsHandler.st
@@ -0,0 +1,8 @@
+testing
+testChatsHandler
+
+ | chatsHandler |
+ chatsHandler := TCCChatsHandler new.
+ self core chatsHandler: chatsHandler.
+
+ self assert: (self core chatsHandler) equals: chatsHandler.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testErrorConstants.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testErrorConstants.st
new file mode 100644
index 000000000..ca4ef98ff
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testErrorConstants.st
@@ -0,0 +1,7 @@
+testing
+testErrorConstants
+
+ self assert: TCCErrorConstants unknownUsername isString.
+ self assert: TCCErrorConstants invalidPhoneNumber isString.
+ self assert: TCCErrorConstants tdlibAlreadyInUse isString.
+ self assert: TCCErrorConstants invalidAuthenticationCode isString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testLoggedInUserID.st b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testLoggedInUserID.st
new file mode 100644
index 000000000..a0799fee7
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/instance/testLoggedInUserID.st
@@ -0,0 +1,5 @@
+testing
+testLoggedInUserID
+
+ self core loggedInUserID: 5.
+ self assert: (self core loggedInUserID) equals: 5.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTCoreTests.class/methodProperties.json
new file mode 100644
index 000000000..bcf020541
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/methodProperties.json
@@ -0,0 +1,13 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "core" : "LL 8/2/2020 20:44",
+ "core:" : "LL 8/2/2020 20:44",
+ "setUp" : "LL 8/2/2020 20:45",
+ "tearDown" : "js 8/2/2020 22:48",
+ "testAuthConstants" : "js 8/2/2020 22:54",
+ "testAuthHandler" : "js 8/2/2020 21:21",
+ "testChatsHandler" : "js 8/2/2020 21:21",
+ "testErrorConstants" : "js 8/2/2020 21:23",
+ "testLoggedInUserID" : "js 8/2/2020 21:21" } }
diff --git a/packages/TelegramClient-Tests.package/TCTCoreTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTCoreTests.class/properties.json
new file mode 100644
index 000000000..21bb7b6b9
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTCoreTests.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 8/2/2020 22:47",
+ "instvars" : [
+ "core" ],
+ "name" : "TCTCoreTests",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTEventTests.class/README.md b/packages/TelegramClient-Tests.package/TCTEventTests.class/README.md
new file mode 100644
index 000000000..d0aca19ba
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTEventTests.class/README.md
@@ -0,0 +1 @@
+Tests the behavior of TCCEvent
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testError.st b/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testError.st
new file mode 100644
index 000000000..6366237a6
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testError.st
@@ -0,0 +1,4 @@
+testing
+testError
+
+ self assert: (TCCEvent newFromTDLibEvent: (Dictionary newFrom: {'@type' -> 'error'. 'code' -> 400})) isError.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testNoError.st b/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testNoError.st
new file mode 100644
index 000000000..535282b46
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testNoError.st
@@ -0,0 +1,6 @@
+testing
+testNoError
+
+ self assert: (TCCEvent newFromTDLibEvent: (Dictionary newFrom: {'@type' -> 'authentication'. 'code' -> 400})) isError not.
+ self assert: (TCCEvent newFromTDLibEvent: (Dictionary newFrom: {'@type' -> 'error'. 'code' -> 200})) isError not.
+ self assert: (TCCEvent newFromTDLibEvent: (Dictionary newFrom: {'@type' -> 'authentication'. 'code' -> 200})) isError not.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testType.st b/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testType.st
new file mode 100644
index 000000000..c6459c3c0
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTEventTests.class/instance/testType.st
@@ -0,0 +1,9 @@
+testing
+testType
+
+ | event |
+
+ event := TCCEvent newFromTDLibEvent: (Dictionary newFrom: {'@type' -> 'authentication'. 'code' -> 200}).
+
+ self assert: event type equals: 'authentication'.
+ self assert: (event includesKey: 'type') not.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTEventTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTEventTests.class/methodProperties.json
new file mode 100644
index 000000000..08012abb0
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTEventTests.class/methodProperties.json
@@ -0,0 +1,7 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "testError" : "js 8/1/2020 12:30",
+ "testNoError" : "js 8/1/2020 12:35",
+ "testType" : "js 8/1/2020 13:36" } }
diff --git a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/properties.json b/packages/TelegramClient-Tests.package/TCTEventTests.class/properties.json
similarity index 57%
rename from packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/properties.json
rename to packages/TelegramClient-Tests.package/TCTEventTests.class/properties.json
index 773304c79..aa2c0737e 100644
--- a/packages/TelegramClient-Tests.package/TCTAbstractTeleClientFactoryMock.class/properties.json
+++ b/packages/TelegramClient-Tests.package/TCTEventTests.class/properties.json
@@ -4,11 +4,11 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 8/1/2020 13:34",
"instvars" : [
],
- "name" : "TCTAbstractTeleClientFactoryMock",
+ "name" : "TCTEventTests",
"pools" : [
],
- "super" : "TCCAbstractTeleClientFactory",
+ "super" : "TestCase",
"type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/README.md b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/README.md
index e69de29bb..85e9d5375 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/README.md
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/README.md
@@ -0,0 +1 @@
+This mock client behaves like a normal FFIClient and can be used for testing.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/create.st b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/create.st
index bb3bd4732..e6bcf254f 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/create.st
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/create.st
@@ -1,4 +1,4 @@
-accessing
+events
create
self setCreated.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/created..st b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/created..st
new file mode 100644
index 000000000..62edff927
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/created..st
@@ -0,0 +1,4 @@
+accessing
+created: aBoolean
+
+ created := aBoolean.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/free..st b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/free..st
index 6e92beffc..3ac9eeed9 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/free..st
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/free..st
@@ -1,4 +1,4 @@
-accessing
+events
free: aHandle
self setFreed.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/freed..st b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/freed..st
new file mode 100644
index 000000000..a19f2f82d
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/freed..st
@@ -0,0 +1,4 @@
+accessing
+freed: aBoolean
+
+ freed := aBoolean.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setCreated.st b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setCreated.st
index 601f37ce7..fbc82af4e 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setCreated.st
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setCreated.st
@@ -1,4 +1,4 @@
accessing
setCreated
- created := true.
\ No newline at end of file
+ self created: true.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setFreed.st b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setFreed.st
index 8efbedc71..80d7fc7f1 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setFreed.st
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/instance/setFreed.st
@@ -1,4 +1,4 @@
accessing
setFreed
- freed := true.
\ No newline at end of file
+ self freed: true.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/methodProperties.json
index b2bc7f2f0..9ee299127 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/methodProperties.json
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/methodProperties.json
@@ -4,7 +4,9 @@
"instance" : {
"create" : "js 5/28/2020 17:31",
"created" : "js 5/28/2020 17:30",
+ "created:" : "js 6/13/2020 12:31",
"free:" : "js 5/28/2020 17:31",
"freed" : "js 5/28/2020 17:31",
- "setCreated" : "js 5/28/2020 17:30",
- "setFreed" : "js 5/28/2020 17:31" } }
+ "freed:" : "js 6/13/2020 12:31",
+ "setCreated" : "js 6/13/2020 12:31",
+ "setFreed" : "js 6/13/2020 12:31" } }
diff --git a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/properties.json b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/properties.json
index 0f9c64019..edf750a3d 100644
--- a/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/properties.json
+++ b/packages/TelegramClient-Tests.package/TCTFFIClientMock.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 16:23",
"instvars" : [
"created",
"freed" ],
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/ArbitraryCodeRule..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/ArbitraryCodeRule..st
deleted file mode 100644
index ce2c4a88a..000000000
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/ArbitraryCodeRule..st
+++ /dev/null
@@ -1,12 +0,0 @@
-private
-ArbitraryCodeRule: rule
-"Verifies an arbritrary code rule."
-|testRunner testObjects positiveResults|
-testRunner := SLTestRunner new environment: SLDefaultEnvironment new.
-
- testObjects := classes.
-testRunner runOnTests: {rule} andTestObjects: testObjects.
-positiveResults := testObjects select: [:testObject | | result |
- result := testObject resultOf: rule.
-result result > 0].
-self assert: positiveResults isEmpty equals: true.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/PrecedenceRuleForMath.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/PrecedenceRuleForMath.st
deleted file mode 100644
index 16794218b..000000000
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/PrecedenceRuleForMath.st
+++ /dev/null
@@ -1,4 +0,0 @@
-organization
-PrecedenceRuleForMath
-"2+4*4 = 18, not 24 as in squeak."
-self ArbitraryCodeRule: #precedenceRule.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/arbitraryCodeRule..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/arbitraryCodeRule..st
new file mode 100644
index 000000000..9d576ccb3
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/arbitraryCodeRule..st
@@ -0,0 +1,4 @@
+private
+arbitraryCodeRule: aRule
+
+ self arbitraryCodeRule: aRule plugIn: SLSmallLintPlugIn.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/arbitraryCodeRule.plugIn..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/arbitraryCodeRule.plugIn..st
new file mode 100644
index 000000000..bddcc1bc1
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/arbitraryCodeRule.plugIn..st
@@ -0,0 +1,15 @@
+private
+arbitraryCodeRule: aRule plugIn: aPlugIn
+
+ | failures result |
+
+ failures := ((SLTestRunner new
+ environment: (self environmentFor: aPlugIn withRule: aRule))
+ runOnTests: {aRule} andTestObjects: self classTestObjects)
+ select: [:testObject |
+ result := (testObject resultOf: aRule).
+ result isSummary
+ ifTrue: [result > 0]
+ ifFalse: [result isNegative]].
+
+ self assert: failures isEmpty description: 'Failures in: ', failures asString.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classTestObjects..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classTestObjects..st
new file mode 100644
index 000000000..9a6bedcbe
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classTestObjects..st
@@ -0,0 +1,4 @@
+accessing
+classTestObjects: aCollection
+
+ classTestObjects := aCollection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classTestObjects.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classTestObjects.st
new file mode 100644
index 000000000..363995218
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classTestObjects.st
@@ -0,0 +1,4 @@
+accessing
+classTestObjects
+
+ ^ classTestObjects
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classes..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classes..st
new file mode 100644
index 000000000..5588a6015
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classes..st
@@ -0,0 +1,4 @@
+accessing
+classes: aCollection
+
+ classes := aCollection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classes.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classes.st
new file mode 100644
index 000000000..bf311ec77
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/classes.st
@@ -0,0 +1,4 @@
+accessing
+classes
+
+ ^ classes
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/environmentFor.withRule..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/environmentFor.withRule..st
new file mode 100644
index 000000000..5668ba758
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/environmentFor.withRule..st
@@ -0,0 +1,6 @@
+private
+environmentFor: aPlugIn withRule: aRule
+
+ ^ aPlugIn = SLSmallLintPlugIn
+ ifTrue: [TCTScopedEnvironment newFor: self classTestObjects test: aRule plugIn: SLSmallLintPlugIn]
+ ifFalse: [SLDefaultEnvironment new]
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/ifTrueReturnsRule.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/ifTrueReturnsRule.st
deleted file mode 100644
index 8184f14b9..000000000
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/ifTrueReturnsRule.st
+++ /dev/null
@@ -1,4 +0,0 @@
-organization
-ifTrueReturnsRule
-"replace IfTrue ifFalse branches with the shorter bool equivalent if possible"
-self ArbitraryCodeRule: #ifTrueReturnsRule.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/initialize.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/initialize.st
index d1088b53e..0674512bf 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/initialize.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/initialize.st
@@ -1,10 +1,10 @@
-private
+initialization
initialize
-|testRunner testObjects|
-testRunner := SLTestRunner new environment: SLDefaultEnvironment new.
-testObjects := SystemNavigation default allClasses .
- testObjects := testObjects select: [:x|(x class category startsWith: 'TelegramClient-Core') or: ( x class category startsWith: 'TelegramClient-UI')].
- testObjects := testObjects collect: [ :aObject |
- aObject as: SLTestObject].
- classes := testObjects.
\ No newline at end of file
+ super initialize.
+
+ self
+ classes: ((SystemNavigation default allClasses
+ select: [:aClass |
+ (aClass class category beginsWith: 'TelegramClient') and: [(aClass class name beginsWith: 'TCCFFIClient') not]]));
+ classTestObjects: (self classes collect: [:anObject | anObject as: SLTestObject]).
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/isLineWithOnlyTabsAndSpaces..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/isLineWithOnlyTabsAndSpaces..st
new file mode 100644
index 000000000..d709d9c17
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/isLineWithOnlyTabsAndSpaces..st
@@ -0,0 +1,4 @@
+private
+isLineWithOnlyTabsAndSpaces: aString
+
+ ^ aString isEmpty or: [aString allSatisfy: [:aChar | aChar = Character space or: [aChar = Character tab]]]
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/methodTestObjects.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/methodTestObjects.st
new file mode 100644
index 000000000..c3c5e5284
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/methodTestObjects.st
@@ -0,0 +1,4 @@
+accessing
+methodTestObjects
+
+ ^ (self classTestObjects collect: [:aClassTestObject | aClassTestObject methods]) flatten
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/methodsLinesDo..st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/methodsLinesDo..st
new file mode 100644
index 000000000..29ccd3c02
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/methodsLinesDo..st
@@ -0,0 +1,5 @@
+private
+methodsLinesDo: aBlock
+
+ self methodTestObjects do: [:aSLMethodTestObject |
+ aBlock value: aSLMethodTestObject sourceCode string lines]
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintContains.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintContains.st
deleted file mode 100644
index 008b135c2..000000000
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintContains.st
+++ /dev/null
@@ -1,4 +0,0 @@
-organization
-smallLintContains
-"Use contains instead of detect: ifNone: "
-self ArbitraryCodeRule: #smallLintContains .
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintSentNotImplemented.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintSentNotImplemented.st
deleted file mode 100644
index 2ba989df4..000000000
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintSentNotImplemented.st
+++ /dev/null
@@ -1,4 +0,0 @@
-organization
-smallLintSentNotImplemented
-"A message sent to a statically resolved type has to be implemented."
-self ArbitraryCodeRule: #smallLintUndeclaredReference.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintUndeclaredReference.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintUndeclaredReference.st
deleted file mode 100644
index 15782443d..000000000
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/smallLintUndeclaredReference.st
+++ /dev/null
@@ -1,4 +0,0 @@
-organization
-smallLintUndeclaredReference
-"If you remove a variable from a class that is accessed by a method, you will create an undeclared variable reference for those methods that accessed the variable."
-self ArbitraryCodeRule: #smallLintUndeclaredReference.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testCorrectClassPrefix.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testCorrectClassPrefix.st
new file mode 100644
index 000000000..6f1cf7f69
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testCorrectClassPrefix.st
@@ -0,0 +1,12 @@
+tests
+testCorrectClassPrefix
+
+ self classes do: [:aClass |
+ (aClass class category endsWith: 'Core')
+ ifTrue: [self assert: (aClass class name beginsWith: 'TCC')].
+
+ (aClass class category endsWith: 'Tests')
+ ifTrue: [self assert: (aClass class name beginsWith: 'TCT')].
+
+ (aClass class category endsWith: 'UI')
+ ifTrue: [self assert: (aClass class name beginsWith: 'TCU')]]
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testIfTrueReturnsRule.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testIfTrueReturnsRule.st
new file mode 100644
index 000000000..51276b1c2
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testIfTrueReturnsRule.st
@@ -0,0 +1,5 @@
+tests
+testIfTrueReturnsRule
+
+ "replace IfTrue ifFalse branches with the shorter bool equivalent if possible"
+ self arbitraryCodeRule: #ifTrueReturnsRule: plugIn: SLRBImportPlugIn.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testInstanceVarAccess.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testInstanceVarAccess.st
new file mode 100644
index 000000000..a06ce102e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testInstanceVarAccess.st
@@ -0,0 +1,4 @@
+tests
+testInstanceVarAccess
+
+ self arbitraryCodeRule: #instanceVariableAccessIsConsistent: plugIn: SLSwaMetricsPlugIn.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testLongMethods.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testLongMethods.st
new file mode 100644
index 000000000..45de13070
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testLongMethods.st
@@ -0,0 +1,4 @@
+tests
+testLongMethods
+
+ self methodsLinesDo: [:lines | self assert: lines size <= 20].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodHasEmptyLine.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodHasEmptyLine.st
new file mode 100644
index 000000000..6584a2708
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodHasEmptyLine.st
@@ -0,0 +1,5 @@
+tests
+testMethodHasEmptyLine
+
+ "also rejects method with tabs or spaces in second line"
+ self methodsLinesDo: [:lines | self assert: (lines size < 2 or: [self isLineWithOnlyTabsAndSpaces: lines second])].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNameIsLowerCase.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNameIsLowerCase.st
new file mode 100644
index 000000000..49d270b14
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNameIsLowerCase.st
@@ -0,0 +1,4 @@
+tests
+testMethodNameIsLowerCase
+
+ self methodsLinesDo: [:lines | self assert: lines first first isLowercase].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNoEmptyLineAtEnd.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNoEmptyLineAtEnd.st
new file mode 100644
index 000000000..f45b54241
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNoEmptyLineAtEnd.st
@@ -0,0 +1,4 @@
+tests
+testMethodNoEmptyLineAtEnd
+
+ self methodsLinesDo: [:lines | self assert: (self isLineWithOnlyTabsAndSpaces: lines last) not].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNoTwoWhitespacesNextToEachOther.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNoTwoWhitespacesNextToEachOther.st
new file mode 100644
index 000000000..347fc46e6
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNoTwoWhitespacesNextToEachOther.st
@@ -0,0 +1,5 @@
+tests
+testMethodNoTwoWhitespacesNextToEachOther
+
+ self methodsLinesDo: [:lines |
+ lines do: [:aLine | self assert: (aLine includesSubstring: String space, String space) not]].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNotTooManyEmptyLines.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNotTooManyEmptyLines.st
new file mode 100644
index 000000000..128ed0c07
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodNotTooManyEmptyLines.st
@@ -0,0 +1,7 @@
+tests
+testMethodNotTooManyEmptyLines
+
+ self methodsLinesDo: [:lines |
+ 1 to: lines size -1 do: [:index |
+ self assert: ((self isLineWithOnlyTabsAndSpaces: (lines at: index))
+ and: [self isLineWithOnlyTabsAndSpaces: (lines at: index + 1)]) not]].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodParamsHaveMeaningFulNames.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodParamsHaveMeaningFulNames.st
new file mode 100644
index 000000000..08c78ef72
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testMethodParamsHaveMeaningFulNames.st
@@ -0,0 +1,4 @@
+tests
+testMethodParamsHaveMeaningFulNames
+
+ self methodsLinesDo: [:lines | self assert: (lines first includesSubstring: 'anObject') not].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoClassComments.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoClassComments.st
new file mode 100644
index 000000000..b3754299a
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoClassComments.st
@@ -0,0 +1,4 @@
+tests
+testNoClassComments
+
+ self arbitraryCodeRule: #noClassComments: plugIn: SLSwaMetricsPlugIn.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoDotAfterReturn.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoDotAfterReturn.st
new file mode 100644
index 000000000..4b632113f
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoDotAfterReturn.st
@@ -0,0 +1,9 @@
+tests
+testNoDotAfterReturn
+
+ | code |
+
+ self methodTestObjects do: [:aSLMethodTestObject |
+ code := aSLMethodTestObject sourceCode string.
+
+ self assert: (SLCodingStylesPlugIn new hasDotAfterReturn: code) ~= true].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnclassifiedMethods.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnclassifiedMethods.st
index e586c6723..5aa3d6773 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnclassifiedMethods.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnclassifiedMethods.st
@@ -1,4 +1,5 @@
-organization
+tests
testNoUnclassifiedMethods
-"all methods have to be classified"
-self ArbitraryCodeRule: #smallLintUnclassifiedMethods.
\ No newline at end of file
+
+ "all methods have to be classified"
+ self arbitraryCodeRule: #smallLintUnclassifiedMethods.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnconditionalRecursion.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnconditionalRecursion.st
index 6c803673f..386d99470 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnconditionalRecursion.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnconditionalRecursion.st
@@ -1,4 +1,5 @@
-organization
+tests
testNoUnconditionalRecursion
-"Infinite recursion is forbidden"
-self ArbitraryCodeRule: #smallLintUnconditionalRecursion.
\ No newline at end of file
+
+ "Infinite recursion is forbidden"
+ self arbitraryCodeRule: #smallLintUnconditionalRecursion.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnreferencedVariables.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnreferencedVariables.st
index 75a4fe2aa..9dee2c9e7 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnreferencedVariables.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testNoUnreferencedVariables.st
@@ -1,3 +1,4 @@
-organization
+tests
testNoUnreferencedVariables
-self ArbitraryCodeRule: #smallLintExcessiveVariables.
\ No newline at end of file
+
+ self arbitraryCodeRule: #smallLintExcessiveVariables.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testSmallLintContains.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testSmallLintContains.st
new file mode 100644
index 000000000..27797a62f
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testSmallLintContains.st
@@ -0,0 +1,5 @@
+tests
+testSmallLintContains
+
+ "Use contains instead of detect: ifNone:"
+ self arbitraryCodeRule: #smallLintContains.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testTemporaryVariableCapitalization.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testTemporaryVariableCapitalization.st
index 4f231aa01..2a0fadd2b 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testTemporaryVariableCapitalization.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testTemporaryVariableCapitalization.st
@@ -1,4 +1,5 @@
-organization
+tests
testTemporaryVariableCapitalization
-"temporary variables should start with lowercase letters"
-self ArbitraryCodeRule: #smallLintTemporaryVariableCapitalization.
\ No newline at end of file
+
+ "temporary variables should start with lowercase letters"
+ self arbitraryCodeRule: #smallLintTemporaryVariableCapitalization.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintClassVariableCapitalization.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintClassVariableCapitalization.st
index 9a281efa6..18d7fc5d9 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintClassVariableCapitalization.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintClassVariableCapitalization.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintClassVariableCapitalization
-"Class vars are pascalcase"
-self ArbitraryCodeRule: #smallLintClassVariableCapitalization.
\ No newline at end of file
+tests
+testsmallLintClassVariableCapitalization
+
+ "Class vars are pascalcase"
+ self arbitraryCodeRule: #smallLintClassVariableCapitalization.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCodeCruftLeftInMethods.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCodeCruftLeftInMethods.st
index 19d37284f..baa3f9706 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCodeCruftLeftInMethods.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCodeCruftLeftInMethods.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintCodeCruftLeftInMethods
-"remove debugger breaks etc from code, otherwise this test fails"
-self ArbitraryCodeRule: #smallLintCodeCruftLeftInMethods.
\ No newline at end of file
+tests
+testsmallLintCodeCruftLeftInMethods
+
+ "remove debugger breaks etc from code, otherwise this test fails"
+ self arbitraryCodeRule: #smallLintCodeCruftLeftInMethods.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCollectSelectNotUsed.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCollectSelectNotUsed.st
index 9edb0899d..9e5c3c094 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCollectSelectNotUsed.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintCollectSelectNotUsed.st
@@ -1,4 +1,5 @@
-organization
+tests
testsmallLintCollectSelectNotUsed
-"prefer collect and select to manual list manipulation and aggregation"
-self ArbitraryCodeRule: #smallLintCollectSelectNotUsed.
\ No newline at end of file
+
+ "prefer collect and select to manual list manipulation and aggregation"
+ self arbitraryCodeRule: #smallLintCollectSelectNotUsed.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintConsistencyCheck.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintConsistencyCheck.st
index 9dfa84c5e..d196b6319 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintConsistencyCheck.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintConsistencyCheck.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintConsistencyCheck
-"isEmpty, isNil and First should be preferred to size = 0, = nil, at: 1"
-self ArbitraryCodeRule: #smallLintConsistencyCheck.
\ No newline at end of file
+tests
+testsmallLintConsistencyCheck
+
+ "isEmpty, isNil and First should be preferred to size = 0, = nil, at: 1"
+ self arbitraryCodeRule: #smallLintConsistencyCheck.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintDefinesEqualNotHash.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintDefinesEqualNotHash.st
index de7faf14d..5da472cc6 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintDefinesEqualNotHash.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintDefinesEqualNotHash.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintDefinesEqualNotHash
-"Menu items should be translated somehow. will be evergreen until we sell this as a feature"
-self ArbitraryCodeRule: #smallLintDefinesEqualNotHash.
\ No newline at end of file
+tests
+testsmallLintDefinesEqualNotHash
+
+ "Menu items should be translated somehow. will be evergreen until we sell this as a feature"
+ self arbitraryCodeRule: #smallLintDefinesEqualNotHash.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEmptyExceptionHandler.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEmptyExceptionHandler.st
index 6f7c6a068..431168eaa 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEmptyExceptionHandler.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEmptyExceptionHandler.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintEmptyExceptionHandler
-"tests for empty exception handling blocks"
-self ArbitraryCodeRule: #smallLintEmptyExceptionHandler.
\ No newline at end of file
+tests
+testsmallLintEmptyExceptionHandler
+
+ "tests for empty exception handling blocks"
+ self arbitraryCodeRule: #smallLintEmptyExceptionHandler.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEqualNotUsed.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEqualNotUsed.st
index b1e133b3c..ae4da4e3d 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEqualNotUsed.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintEqualNotUsed.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintEqualNotUsed
-"results of an equal call are ignored"
-self ArbitraryCodeRule: #smallLintEqualNotUsed.
\ No newline at end of file
+tests
+testsmallLintEqualNotUsed
+
+ "results of an equal call are ignored"
+ self arbitraryCodeRule: #smallLintEqualNotUsed.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintFloatEqualityComparison.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintFloatEqualityComparison.st
index d634cbd6f..e25ed9753 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintFloatEqualityComparison.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintFloatEqualityComparison.st
@@ -1,4 +1,5 @@
-organization
+tests
testsmallLintFloatEqualityComparison
-"All float comparisons should use equals and not ="
-self ArbitraryCodeRule: #smallLintFloatEqualityComparison.
\ No newline at end of file
+
+ "All float comparisons should use equals and not ="
+ self arbitraryCodeRule: #smallLintFloatEqualityComparison.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintLiteralArrayCharacters.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintLiteralArrayCharacters.st
index 893f84b85..2afd2bdad 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintLiteralArrayCharacters.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintLiteralArrayCharacters.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintLiteralArrayCharacters
-"literal char arrays should be strings"
-self ArbitraryCodeRule: #smallLintLiteralArrayCharacters.
\ No newline at end of file
+tests
+testsmallLintLiteralArrayCharacters
+
+ "literal char arrays should be strings"
+ self arbitraryCodeRule: #smallLintLiteralArrayCharacters.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMethodModifierOverride.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMethodModifierOverride.st
index ddf1c7b0b..426638deb 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMethodModifierOverride.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMethodModifierOverride.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintMethodModifierOverride
-"Checks that messages marked as override actually override something"
-self ArbitraryCodeRule: #smallLintMethodModifierOverride.
\ No newline at end of file
+tests
+testsmallLintMethodModifierOverride
+
+ "Checks that messages marked as override actually override something"
+ self arbitraryCodeRule: #smallLintMethodModifierOverride.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMissingTranslationsInMenus.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMissingTranslationsInMenus.st
index 9c3ea262c..20f53cd2e 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMissingTranslationsInMenus.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintMissingTranslationsInMenus.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintMissingTranslationsInMenus
-"Menu items should be translated somehow. will be evergreen until we sell this as a feature"
-self ArbitraryCodeRule: #smallLintMissingTranslationsInMenus.
\ No newline at end of file
+tests
+testsmallLintMissingTranslationsInMenus
+
+ "Menu items should be translated somehow. will be evergreen until we sell this as a feature"
+ self arbitraryCodeRule: #smallLintMissingTranslationsInMenus.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintModifiesCollection.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintModifiesCollection.st
index 1961c0973..9d8fd7901 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintModifiesCollection.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintModifiesCollection.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintModifiesCollection
-"Non threadsafe and tracking iterators are used in squeak, so modifying collections while iterating over them does not work"
-self ArbitraryCodeRule: #smallLintModifiesCollection .
\ No newline at end of file
+tests
+testsmallLintModifiesCollection
+
+ "Non threadsafe and tracking iterators are used in squeak, so modifying collections while iterating over them does not work"
+ self arbitraryCodeRule: #smallLintModifiesCollection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintOnlyReadOrWrittenTemporary.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintOnlyReadOrWrittenTemporary.st
new file mode 100644
index 000000000..d7616c7e0
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintOnlyReadOrWrittenTemporary.st
@@ -0,0 +1,4 @@
+tests
+testsmallLintOnlyReadOrWrittenTemporary
+
+ self arbitraryCodeRule: #smallLintOnlyReadOrWrittenTemporary.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintReturnsBooleanAndOther.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintReturnsBooleanAndOther.st
index 20e938926..cdb233a05 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintReturnsBooleanAndOther.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintReturnsBooleanAndOther.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintReturnsBooleanAndOther
-"When one return type is a bool, all should be. obviously"
-self ArbitraryCodeRule: #smallLintReturnsBooleanAndOther.
\ No newline at end of file
+tests
+testsmallLintReturnsBooleanAndOther
+
+ "When one return type is a bool, all should be. obviously"
+ self arbitraryCodeRule: #smallLintReturnsBooleanAndOther.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSendsUnknownMessageToGlobal.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSendsUnknownMessageToGlobal.st
index c5086b993..f987ddc60 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSendsUnknownMessageToGlobal.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSendsUnknownMessageToGlobal.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintSendsUnknownMessageToGlobal
-"Globals can be checked to implement a message with this test."
-self ArbitraryCodeRule: #smallLintSendsUnknownMessageToGlobal.
\ No newline at end of file
+tests
+testsmallLintSendsUnknownMessageToGlobal
+
+ "Globals can be checked to implement a message with this test."
+ self arbitraryCodeRule: #smallLintSendsUnknownMessageToGlobal.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSizeCheck.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSizeCheck.st
index f609df405..2b9fd541a 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSizeCheck.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintSizeCheck.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintSizeCheck
-"Checking size is irrelevant if you only enumerate."
-self ArbitraryCodeRule: #smallLintSizeCheck .
\ No newline at end of file
+tests
+testsmallLintSizeCheck
+
+ "Checking size is irrelevant if you only enumerate."
+ self arbitraryCodeRule: #smallLintSizeCheck.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintStringConcatenation.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintStringConcatenation.st
index 31d5a6a25..d90cebcf8 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintStringConcatenation.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintStringConcatenation.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintStringConcatenation
-"strings should be streamed when possible instead of concatted, as the runtime is better"
-self ArbitraryCodeRule: #smallLintStringConcatenation.
\ No newline at end of file
+tests
+testsmallLintStringConcatenation
+
+ "strings should be streamed when possible instead of concatted, as the runtime is better"
+ self arbitraryCodeRule: #smallLintStringConcatenation.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempVarOverridesInstVar.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempVarOverridesInstVar.st
index 589e4ca5f..b98356634 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempVarOverridesInstVar.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempVarOverridesInstVar.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintTempVarOverridesInstVar
-"temp vars override the instance vars in scope which leads to easy bugs. choose different names!"
-self ArbitraryCodeRule: #smallLintTempVarOverridesInstVar.
\ No newline at end of file
+tests
+testsmallLintTempVarOverridesInstVar
+
+ "temp vars override the instance vars in scope which leads to easy bugs. choose different names!"
+ self arbitraryCodeRule: #smallLintTempVarOverridesInstVar.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTemporaryVariableCapitalization.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTemporaryVariableCapitalization.st
index a54b8054d..8d3600d1c 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTemporaryVariableCapitalization.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTemporaryVariableCapitalization.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintTemporaryVariableCapitalization
-"temporary variables should be lowercase"
-self ArbitraryCodeRule: #smallLintTemporaryVariableCapitalization.
\ No newline at end of file
+tests
+testsmallLintTemporaryVariableCapitalization
+
+ "temporary variables should be lowercase"
+ self arbitraryCodeRule: #smallLintTemporaryVariableCapitalization.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempsReadBeforeWritten.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempsReadBeforeWritten.st
index 38a821193..7b9082e15 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempsReadBeforeWritten.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintTempsReadBeforeWritten.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintTempsReadBeforeWritten
-"Temp vars should be initialized before being written"
-self ArbitraryCodeRule: #smallLintTempsReadBeforeWritten.
\ No newline at end of file
+tests
+testsmallLintTempsReadBeforeWritten
+
+ "Temp vars should be initialized before being written"
+ self arbitraryCodeRule: #smallLintTempsReadBeforeWritten.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnoptimizedAndOr.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnoptimizedAndOr.st
index 2db4d2155..b7c643795 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnoptimizedAndOr.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnoptimizedAndOr.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintUnoptimizedAndOr
-"dont use nested ands, have them all at the top level"
-self ArbitraryCodeRule: #smallLintUnoptimizedAndOr.
\ No newline at end of file
+tests
+testsmallLintUnoptimizedAndOr
+
+ "dont use nested ands, have them all at the top level"
+ self arbitraryCodeRule: #smallLintUnoptimizedAndOr.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnpackagedCode.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnpackagedCode.st
index 31d654719..17e2c5723 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnpackagedCode.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUnpackagedCode.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintUnpackagedCode
-"All of our code should be in a monticello package."
-self ArbitraryCodeRule: #smallLintUnpackagedCode.
\ No newline at end of file
+tests
+testsmallLintUnpackagedCode
+
+ "All of our code should be in a monticello package."
+ self arbitraryCodeRule: #smallLintUnpackagedCode.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesAdd.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesAdd.st
index 4624699c3..f372439f7 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesAdd.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesAdd.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintUsesAdd
-"Adding to a list returns the added elements. These can be ignored, as they are alread available as parameter"
-self ArbitraryCodeRule: #smallLintUsesAdd.
\ No newline at end of file
+tests
+testsmallLintUsesAdd
+
+ "Adding to a list returns the added elements. These can be ignored, as they are alread available as parameter"
+ self arbitraryCodeRule: #smallLintUsesAdd.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesTrue.st b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesTrue.st
index 4fdbde21e..53e409086 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesTrue.st
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/instance/testsmallLintUsesTrue.st
@@ -1,4 +1,5 @@
-organization
-testsmallLintUsesTrue
-"There is a difference between true and True, and we should use true?"
-self ArbitraryCodeRule: #smallLintUsesTrue.
\ No newline at end of file
+tests
+testsmallLintUsesTrue
+
+ "There is a difference between true and True, and we should use true?"
+ self arbitraryCodeRule: #smallLintUsesTrue.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTLinterTests.class/methodProperties.json
index ef12eb876..6bbb90e27 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/methodProperties.json
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/methodProperties.json
@@ -2,37 +2,55 @@
"class" : {
},
"instance" : {
- "ArbitraryCodeRule:" : "N.S. 6/1/2020 14:21",
- "PrecedenceRuleForMath" : "N.S. 5/21/2020 10:09",
- "ifTrueReturnsRule" : "N.S. 5/28/2020 09:56",
- "initialize" : "N.S. 6/1/2020 14:18",
- "smallLintContains" : "N.S. 5/28/2020 09:57",
- "smallLintSentNotImplemented" : "N.S. 5/28/2020 09:58",
- "smallLintUndeclaredReference" : "N.S. 5/28/2020 09:57",
- "testNoUnclassifiedMethods" : "N.S. 5/21/2020 10:11",
- "testNoUnconditionalRecursion" : "N.S. 5/21/2020 10:11",
- "testNoUnreferencedVariables" : "N.S. 5/21/2020 10:10",
- "testTemporaryVariableCapitalization" : "N.S. 5/21/2020 10:10",
- "testsmallLintClassVariableCapitalization" : "N.S. 5/21/2020 10:08",
- "testsmallLintCodeCruftLeftInMethods" : "N.S. 5/21/2020 10:20",
- "testsmallLintCollectSelectNotUsed" : "N.S. 5/21/2020 10:10",
- "testsmallLintConsistencyCheck" : "N.S. 5/21/2020 10:15",
- "testsmallLintDefinesEqualNotHash" : "N.S. 5/21/2020 10:28",
- "testsmallLintEmptyExceptionHandler" : "N.S. 5/21/2020 10:29",
- "testsmallLintEqualNotUsed" : "N.S. 5/21/2020 10:28",
- "testsmallLintFloatEqualityComparison" : "N.S. 5/21/2020 10:10",
- "testsmallLintLiteralArrayCharacters" : "N.S. 5/21/2020 10:10",
- "testsmallLintMethodModifierOverride" : "N.S. 5/21/2020 10:06",
- "testsmallLintMissingTranslationsInMenus" : "N.S. 5/21/2020 10:27",
- "testsmallLintModifiesCollection" : "N.S. 5/21/2020 10:31",
- "testsmallLintReturnsBooleanAndOther" : "N.S. 5/21/2020 10:32",
- "testsmallLintSendsUnknownMessageToGlobal" : "N.S. 5/21/2020 10:07",
- "testsmallLintSizeCheck" : "N.S. 5/21/2020 10:13",
- "testsmallLintStringConcatenation" : "N.S. 5/21/2020 10:18",
- "testsmallLintTempVarOverridesInstVar" : "N.S. 5/21/2020 10:30",
- "testsmallLintTemporaryVariableCapitalization" : "N.S. 5/21/2020 10:13",
- "testsmallLintTempsReadBeforeWritten" : "N.S. 5/21/2020 10:33",
- "testsmallLintUnoptimizedAndOr" : "N.S. 5/21/2020 10:19",
- "testsmallLintUnpackagedCode" : "N.S. 5/21/2020 10:34",
- "testsmallLintUsesAdd" : "N.S. 5/21/2020 10:35",
- "testsmallLintUsesTrue" : "N.S. 5/21/2020 10:02" } }
+ "arbitraryCodeRule:" : "js 6/13/2020 18:04",
+ "arbitraryCodeRule:plugIn:" : "js 6/13/2020 18:04",
+ "classTestObjects" : "js 6/13/2020 13:28",
+ "classTestObjects:" : "js 6/13/2020 13:28",
+ "classes" : "js 6/13/2020 11:38",
+ "classes:" : "js 6/13/2020 11:38",
+ "environmentFor:withRule:" : "js 6/13/2020 17:53",
+ "initialize" : "ct 10/7/2020 19:31",
+ "isLineWithOnlyTabsAndSpaces:" : "j 7/16/2020 12:30",
+ "methodTestObjects" : "js 6/13/2020 14:06",
+ "methodsLinesDo:" : "js 6/13/2020 18:05",
+ "testCorrectClassPrefix" : "ct 10/7/2020 19:32",
+ "testIfTrueReturnsRule" : "js 6/13/2020 18:35",
+ "testInstanceVarAccess" : "js 6/13/2020 16:54",
+ "testLongMethods" : "rs 6/25/2020 10:47",
+ "testMethodHasEmptyLine" : "j 7/16/2020 12:29",
+ "testMethodNameIsLowerCase" : "js 6/13/2020 18:05",
+ "testMethodNoEmptyLineAtEnd" : "j 7/16/2020 12:32",
+ "testMethodNoTwoWhitespacesNextToEachOther" : "js 6/13/2020 18:56",
+ "testMethodNotTooManyEmptyLines" : "js 6/13/2020 18:36",
+ "testMethodParamsHaveMeaningFulNames" : "js 6/13/2020 19:09",
+ "testNoClassComments" : "js 6/13/2020 17:09",
+ "testNoDotAfterReturn" : "js 6/13/2020 18:09",
+ "testNoUnclassifiedMethods" : "js 6/13/2020 18:06",
+ "testNoUnconditionalRecursion" : "js 6/13/2020 11:44",
+ "testNoUnreferencedVariables" : "js 6/13/2020 18:09",
+ "testSmallLintContains" : "js 6/13/2020 18:36",
+ "testTemporaryVariableCapitalization" : "js 6/13/2020 18:09",
+ "testsmallLintClassVariableCapitalization" : "js 6/13/2020 18:37",
+ "testsmallLintCodeCruftLeftInMethods" : "js 6/13/2020 18:37",
+ "testsmallLintCollectSelectNotUsed" : "js 6/13/2020 18:07",
+ "testsmallLintConsistencyCheck" : "js 6/13/2020 18:37",
+ "testsmallLintDefinesEqualNotHash" : "js 6/13/2020 18:37",
+ "testsmallLintEmptyExceptionHandler" : "js 6/13/2020 18:37",
+ "testsmallLintEqualNotUsed" : "js 6/13/2020 18:37",
+ "testsmallLintFloatEqualityComparison" : "js 6/13/2020 18:07",
+ "testsmallLintLiteralArrayCharacters" : "js 6/13/2020 18:37",
+ "testsmallLintMethodModifierOverride" : "js 6/13/2020 18:37",
+ "testsmallLintMissingTranslationsInMenus" : "js 6/13/2020 18:37",
+ "testsmallLintModifiesCollection" : "js 6/13/2020 18:38",
+ "testsmallLintOnlyReadOrWrittenTemporary" : "js 6/13/2020 19:21",
+ "testsmallLintReturnsBooleanAndOther" : "js 6/13/2020 18:38",
+ "testsmallLintSendsUnknownMessageToGlobal" : "js 6/13/2020 18:38",
+ "testsmallLintSizeCheck" : "js 6/13/2020 18:38",
+ "testsmallLintStringConcatenation" : "js 6/13/2020 18:38",
+ "testsmallLintTempVarOverridesInstVar" : "js 6/13/2020 18:38",
+ "testsmallLintTemporaryVariableCapitalization" : "js 6/13/2020 18:56",
+ "testsmallLintTempsReadBeforeWritten" : "js 6/13/2020 18:38",
+ "testsmallLintUnoptimizedAndOr" : "js 6/13/2020 18:39",
+ "testsmallLintUnpackagedCode" : "js 6/13/2020 18:39",
+ "testsmallLintUsesAdd" : "js 6/13/2020 18:39",
+ "testsmallLintUsesTrue" : "js 6/13/2020 18:39" } }
diff --git a/packages/TelegramClient-Tests.package/TCTLinterTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTLinterTests.class/properties.json
index f2c7654ac..e8cff09d1 100644
--- a/packages/TelegramClient-Tests.package/TCTLinterTests.class/properties.json
+++ b/packages/TelegramClient-Tests.package/TCTLinterTests.class/properties.json
@@ -6,7 +6,8 @@
],
"commentStamp" : "N.S. 5/14/2020 11:48",
"instvars" : [
- "classes" ],
+ "classes",
+ "classTestObjects" ],
"name" : "TCTLinterTests",
"pools" : [
],
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/README.md b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/README.md
new file mode 100644
index 000000000..6a6951d1b
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/README.md
@@ -0,0 +1 @@
+This class tests loggedIn functions
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/core..st b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/core..st
similarity index 65%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/core..st
rename to packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/core..st
index 7c0019d8e..3844709d3 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/core..st
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/core..st
@@ -1,4 +1,4 @@
-initialization
+accessing
core: aCore
core := aCore.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/core.st b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/core.st
new file mode 100644
index 000000000..7652dd8d1
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/core.st
@@ -0,0 +1,4 @@
+accessing
+core
+
+ ^ core
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/setUp.st b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/setUp.st
new file mode 100644
index 000000000..d0774d8b9
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/setUp.st
@@ -0,0 +1,9 @@
+running
+setUp
+
+ self timeout: 20.
+ self core: TCTTestCore new.
+ 1 seconds wait.
+ self core authHandler isAuthorizationStateReady ifFalse: [
+ self core loginWithTestData.
+ 2 seconds wait].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/tearDown.st b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/tearDown.st
new file mode 100644
index 000000000..c87b2af04
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/tearDown.st
@@ -0,0 +1,4 @@
+running
+tearDown
+
+ self core client specificClient isNil ifFalse: [self core client free].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/testLogout.st b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/testLogout.st
new file mode 100644
index 000000000..f7844ac5e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/testLogout.st
@@ -0,0 +1,8 @@
+testing
+testLogout
+
+
+
+ self core authHandler logout.
+ 10 seconds wait.
+ self assert: self core authHandler isAuthStateClosed.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/testMessageSending.st b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/testMessageSending.st
new file mode 100644
index 000000000..905399eee
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/instance/testMessageSending.st
@@ -0,0 +1,12 @@
+testing
+testMessageSending
+
+ | testChatMessages |
+
+ self core sendMessage: 'TestMessage' to: self core loggedInUserID.
+ 10 seconds wait.
+
+ testChatMessages := (self core chats getChat: self core loggedInUserID) messages.
+ self assert: (testChatMessages contains: [:aMessage |
+ (aMessage message = 'TestMessage') and:
+ (aMessage chatID = self core loggedInUserID)]).
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/methodProperties.json
new file mode 100644
index 000000000..ea72d17cf
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/methodProperties.json
@@ -0,0 +1,10 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "core" : "r.s 7/15/2020 18:46",
+ "core:" : "r.s 7/15/2020 18:46",
+ "setUp" : "js 8/1/2020 12:51",
+ "tearDown" : "r.s 7/16/2020 16:54",
+ "testLogout" : "ct 10/7/2020 20:20",
+ "testMessageSending" : "r.s 7/16/2020 16:53" } }
diff --git a/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/properties.json
new file mode 100644
index 000000000..b0b3c6956
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTLoggedInTests.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "r.s 7/15/2020 19:22",
+ "instvars" : [
+ "core" ],
+ "name" : "TCTLoggedInTests",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/README.md b/packages/TelegramClient-Tests.package/TCTRequestTests.class/README.md
new file mode 100644
index 000000000..b26f0ff9a
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/README.md
@@ -0,0 +1 @@
+Tests the behavior of TCCRequest
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/request..st b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/request..st
new file mode 100644
index 000000000..a5c8b6fbe
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/request..st
@@ -0,0 +1,4 @@
+accessing
+request: aRequest
+
+ request := aRequest.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/request.st b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/request.st
new file mode 100644
index 000000000..5222067ff
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/request.st
@@ -0,0 +1,4 @@
+accessing
+request
+
+ ^ request
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/setUp.st b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/setUp.st
new file mode 100644
index 000000000..1f8b2f9c5
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/setUp.st
@@ -0,0 +1,4 @@
+running
+setUp
+
+ self request: (TCCRequest newWithType: 'test' from: {'code' -> '0'. 'id' -> '10'}).
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/testString.st b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/testString.st
new file mode 100644
index 000000000..afc03954c
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/testString.st
@@ -0,0 +1,7 @@
+testing
+testString
+
+ self assert: (self request asString includesSubstring: '"@type":"test"').
+ self assert: (self request asString includesSubstring: '"code":"0"').
+ self assert: (self request asString beginsWith: '{').
+ self assert: (self request asString endsWith: '}').
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/testType.st b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/testType.st
new file mode 100644
index 000000000..b22ddaf67
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/instance/testType.st
@@ -0,0 +1,4 @@
+testing
+testType
+
+ self assert: (self request at: '@type') equals: 'test'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTRequestTests.class/methodProperties.json
new file mode 100644
index 000000000..5aec101d5
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/methodProperties.json
@@ -0,0 +1,9 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "request" : "js 8/1/2020 12:09",
+ "request:" : "js 8/1/2020 12:10",
+ "setUp" : "js 8/1/2020 12:21",
+ "testString" : "ct 10/7/2020 19:31",
+ "testType" : "js 8/1/2020 12:12" } }
diff --git a/packages/TelegramClient-Tests.package/TCTRequestTests.class/properties.json b/packages/TelegramClient-Tests.package/TCTRequestTests.class/properties.json
new file mode 100644
index 000000000..5eaa2f475
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTRequestTests.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 8/1/2020 13:35",
+ "instvars" : [
+ "request" ],
+ "name" : "TCTRequestTests",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/README.md b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/README.md
new file mode 100644
index 000000000..2498aaee7
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/README.md
@@ -0,0 +1 @@
+TCTSarFileGenerator is our CD pipeline sar file generator for offline sar files
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/generatePreamble.uipackage.nativeResourceFolder..st b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/generatePreamble.uipackage.nativeResourceFolder..st
new file mode 100644
index 000000000..eaf831e9e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/generatePreamble.uipackage.nativeResourceFolder..st
@@ -0,0 +1,9 @@
+helpers
+generatePreamble: corePackage uipackage: uiPackage nativeResourceFolder: aFolder
+
+ ^ '
+ self fileInMonticelloZipVersionNamed: ''', corePackage, '.mcz''.
+ self fileInMonticelloZipVersionNamed: ''', uiPackage, '.mcz''.
+ TCUTelegram registerInWorldMenu.
+ self zip members do: [:aFile | self extractMemberWithoutPath: aFile inDirectory: FileDirectory default].
+ TCCFFIClient newForCurrentOS class moduleName.'
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/streamForPackage.inZip..st b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/streamForPackage.inZip..st
new file mode 100644
index 000000000..0cbc45d0c
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/streamForPackage.inZip..st
@@ -0,0 +1,10 @@
+helpers
+streamForPackage: aPackage inZip: aZip
+
+ | mczStream workingCopy version |
+
+ mczStream := RWBinaryOrTextStream on: (String new: 10000).
+ workingCopy := MCWorkingCopy forPackage: (MCPackage new name: aPackage).
+ version := self versionForWorkingCopy: workingCopy.
+ version fileOutOn: mczStream.
+ (aZip addString: mczStream contents as: aPackage , '.mcz') desiredCompressionLevel: 0.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/testCreateSarFile.st b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/testCreateSarFile.st
new file mode 100644
index 000000000..a2e8dd9f6
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/testCreateSarFile.st
@@ -0,0 +1,14 @@
+testing
+testCreateSarFile
+
+ | zip tdlibFolder corePackage uiPackage |
+
+ corePackage := 'TelegramClient-Core'.
+ uiPackage := 'TelegramClient-UI'.
+ tdlibFolder := 'TDLib'.
+ zip := ZipArchive new.
+ self streamForPackage: corePackage inZip: zip.
+ self streamForPackage: uiPackage inZip: zip.
+ zip addTree: Smalltalk imagePath match: [:e | e fullName beginsWith: Smalltalk imagePath, FileDirectory slash, tdlibFolder].
+ zip addString: (self generatePreamble: corePackage uipackage: uiPackage nativeResourceFolder: tdlibFolder) as: 'install/preamble'.
+ zip writeToFileNamed: 'TelegramClient.sar'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/versionForWorkingCopy..st b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/versionForWorkingCopy..st
new file mode 100644
index 000000000..4b4bd7487
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/instance/versionForWorkingCopy..st
@@ -0,0 +1,12 @@
+helpers
+versionForWorkingCopy: aWorkingCopy
+
+ | version |
+
+ version := ''.
+ [version := aWorkingCopy newVersion]
+ on: MCVersionNameAndMessageRequest
+ do: [:anObject |
+ anObject patchBlock value.
+ anObject resume: (Array with: anObject suggestedName with: '' with: Set new)].
+ ^ version
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/methodProperties.json
new file mode 100644
index 000000000..a09cea951
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/methodProperties.json
@@ -0,0 +1,8 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "generatePreamble:uipackage:nativeResourceFolder:" : "js 8/7/2020 22:23",
+ "streamForPackage:inZip:" : "js 8/2/2020 13:52",
+ "testCreateSarFile" : "ct 10/7/2020 19:32",
+ "versionForWorkingCopy:" : "js 8/2/2020 13:52" } }
diff --git a/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/properties.json b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/properties.json
new file mode 100644
index 000000000..d9e5556e1
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTSarFileGenerator.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "N.S. 7/22/2020 17:56",
+ "instvars" : [
+ ],
+ "name" : "TCTSarFileGenerator",
+ "pools" : [
+ ],
+ "super" : "TestCase",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/README.md b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/README.md
new file mode 100644
index 000000000..8615eabd3
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/README.md
@@ -0,0 +1 @@
+a scoped environment to run single tests faster
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/class/newFor.test.plugIn..st b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/class/newFor.test.plugIn..st
new file mode 100644
index 000000000..e32745565
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/class/newFor.test.plugIn..st
@@ -0,0 +1,4 @@
+instance creation
+newFor: aCollection test: aSymbol plugIn: aPlugin
+
+ ^ self basicNew initializeForClasses: aCollection test: aSymbol plugIn: aPlugin
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/fetchClasses..st b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/fetchClasses..st
new file mode 100644
index 000000000..bd80a84fb
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/fetchClasses..st
@@ -0,0 +1,7 @@
+testing
+fetchClasses: aCollection
+
+ aCollection do: [ :aClass |
+ aClass category ifNotNil: [
+ (self category: aClass category)
+ add: aClass name]].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/initializeForClasses.test.plugIn..st b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/initializeForClasses.test.plugIn..st
new file mode 100644
index 000000000..58725f945
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/initializeForClasses.test.plugIn..st
@@ -0,0 +1,10 @@
+initialization
+initializeForClasses: aCollection test: aSymbol plugIn: aPlugin
+
+ super initialize.
+ self systemClasses: Dictionary new.
+
+ self
+ initializeInstanceVariables;
+ loadTest: aSymbol plugIn: aPlugin;
+ fetchClasses: aCollection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/loadTest.plugIn..st b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/loadTest.plugIn..st
new file mode 100644
index 000000000..3cdca478d
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/loadTest.plugIn..st
@@ -0,0 +1,6 @@
+testing
+loadTest: aSymbol plugIn: aPlugin
+
+ self addTest: (SLTestData newFromDefault
+ symbol: aSymbol;
+ plugIn: aPlugin).
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/systemClasses..st b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/systemClasses..st
new file mode 100644
index 000000000..0695db44e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/instance/systemClasses..st
@@ -0,0 +1,4 @@
+accessing
+systemClasses: aCollection
+
+ systemClasses := aCollection.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/methodProperties.json
new file mode 100644
index 000000000..91258d4bd
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/methodProperties.json
@@ -0,0 +1,8 @@
+{
+ "class" : {
+ "newFor:test:plugIn:" : "js 6/13/2020 16:40" },
+ "instance" : {
+ "fetchClasses:" : "js 6/13/2020 18:39",
+ "initializeForClasses:test:plugIn:" : "js 6/13/2020 18:23",
+ "loadTest:plugIn:" : "js 6/13/2020 19:18",
+ "systemClasses:" : "js 6/13/2020 17:49" } }
diff --git a/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/properties.json b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/properties.json
new file mode 100644
index 000000000..390bb320b
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTScopedEnvironment.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 6/13/2020 17:24",
+ "instvars" : [
+ ],
+ "name" : "TCTScopedEnvironment",
+ "pools" : [
+ ],
+ "super" : "SLEnvironment",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/README.md b/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/README.md
deleted file mode 100644
index 3efbbc1bd..000000000
--- a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/README.md
+++ /dev/null
@@ -1 +0,0 @@
-TeleClientTests is responsible for testing correct FFI interation with tdlib as well as handle clearing
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/instance/testFactoryCreatesCorrectClientForPlatform.st b/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/instance/testFactoryCreatesCorrectClientForPlatform.st
deleted file mode 100644
index 31eb32345..000000000
--- a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/instance/testFactoryCreatesCorrectClientForPlatform.st
+++ /dev/null
@@ -1,10 +0,0 @@
-factory
-testFactoryCreatesCorrectClientForPlatform
-
- | client osList factory classList |
- osList := #('Win32' 'Mac OS' 'Linux').
- classList := #(WindowsClient MacClient LinuxClient).
- factory := TCCTeleClientFactory new.
- osList do: [:os |
- client := factory createClient: os.
- self assert: client type equals: os].
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/methodProperties.json
deleted file mode 100644
index f0dce5b5b..000000000
--- a/packages/TelegramClient-Tests.package/TCTTeleClientTests.class/methodProperties.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "testClientDestroysHandle" : "js 5/28/2020 17:46",
- "testFactoryCreatesCorrectClientForPlatform" : "js 5/28/2020 17:37" } }
diff --git a/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/README.md b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/README.md
new file mode 100644
index 000000000..22d561203
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/README.md
@@ -0,0 +1 @@
+Uses registered Information to logInto Telegram Test Database Service
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/apiHash.st b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/apiHash.st
new file mode 100644
index 000000000..40ad5457e
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/apiHash.st
@@ -0,0 +1,4 @@
+accessing
+apiHash
+
+ ^ 'bda1c0b38033d2a5f2ce7e8ab06ef31a'
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/apiID.st b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/apiID.st
new file mode 100644
index 000000000..861ef94ee
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/apiID.st
@@ -0,0 +1,4 @@
+accessing
+apiID
+
+ ^ '1733417'
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/useTestDC.st b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/useTestDC.st
new file mode 100644
index 000000000..e6ab0a367
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/instance/useTestDC.st
@@ -0,0 +1,4 @@
+accessing
+useTestDC
+
+ ^ true
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/methodProperties.json
new file mode 100644
index 000000000..175d6de7b
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/methodProperties.json
@@ -0,0 +1,7 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "apiHash" : "rs 6/14/2020 12:42",
+ "apiID" : "rs 6/14/2020 12:45",
+ "useTestDC" : "rs 6/14/2020 12:41" } }
diff --git a/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/properties.json b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/properties.json
new file mode 100644
index 000000000..5372bd2f4
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestAuthHandler.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "rs 6/14/2020 12:57",
+ "instvars" : [
+ ],
+ "name" : "TCTTestAuthHandler",
+ "pools" : [
+ ],
+ "super" : "TCCAuthHandler",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-Tests.package/TCTTestCore.class/README.md b/packages/TelegramClient-Tests.package/TCTTestCore.class/README.md
new file mode 100644
index 000000000..a52bf5c25
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestCore.class/README.md
@@ -0,0 +1 @@
+Creates a TestApp using Telegram TestDatabase Service
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestCore.class/instance/initializeHandlers.st b/packages/TelegramClient-Tests.package/TCTTestCore.class/instance/initializeHandlers.st
new file mode 100644
index 000000000..a44c2058f
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestCore.class/instance/initializeHandlers.st
@@ -0,0 +1,6 @@
+initialization
+initializeHandlers
+
+ self
+ authHandler: (TCTTestAuthHandler new app: self);
+ chatsHandler: (TCCChatsHandler new app: self).
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestCore.class/instance/loginWithTestData.st b/packages/TelegramClient-Tests.package/TCTTestCore.class/instance/loginWithTestData.st
new file mode 100644
index 000000000..fbb2cd5ec
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestCore.class/instance/loginWithTestData.st
@@ -0,0 +1,6 @@
+logIn
+loginWithTestData
+
+ self authHandler sendPhoneNumber: '9996612345'.
+ 2 seconds wait.
+ self checkAuthenticationCode: '11111'.
\ No newline at end of file
diff --git a/packages/TelegramClient-Tests.package/TCTTestCore.class/methodProperties.json b/packages/TelegramClient-Tests.package/TCTTestCore.class/methodProperties.json
new file mode 100644
index 000000000..498a6f1cc
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestCore.class/methodProperties.json
@@ -0,0 +1,6 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "initializeHandlers" : "rs 6/14/2020 12:49",
+ "loginWithTestData" : "ct 10/7/2020 20:11" } }
diff --git a/packages/TelegramClient-Tests.package/TCTTestCore.class/properties.json b/packages/TelegramClient-Tests.package/TCTTestCore.class/properties.json
new file mode 100644
index 000000000..53e65ce22
--- /dev/null
+++ b/packages/TelegramClient-Tests.package/TCTTestCore.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "TelegramClient-Tests",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "rs 6/14/2020 12:57",
+ "instvars" : [
+ ],
+ "name" : "TCTTestCore",
+ "pools" : [
+ ],
+ "super" : "TCCCore",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/README.md b/packages/TelegramClient-UI.package/TCAuthentication.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/addHeader.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/addHeader.st
deleted file mode 100644
index 5a1157e21..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/addHeader.st
+++ /dev/null
@@ -1,12 +0,0 @@
-initialization
-addHeader
-
- | header |
- header := RectangleMorph new
- borderWidth: 0;
- color: TCDefaultValues colorGray;
- extent: self width @ 40.
-
- self
- addMorph: header;
- addTitle: 'Telegram' to: header.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/addTitle.to..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/addTitle.to..st
deleted file mode 100644
index 6fab03ac3..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/addTitle.to..st
+++ /dev/null
@@ -1,10 +0,0 @@
-initialization
-addTitle: aString to: aMorph
-
- | titleLable font |
- font:= (TextFontReference toFont: (StrikeFont familyName: 'DefaultTextStyle' size: 35)).
- titleLable := TextMorph new
- contents: (aString asText addAttribute: font);
- color: Color white.
-
- aMorph addMorphCentered: titleLable.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBackPressed.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBackPressed.st
deleted file mode 100644
index a491d3a73..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBackPressed.st
+++ /dev/null
@@ -1,11 +0,0 @@
-initialization
-buttonBackPressed
-
- self instructionLabel delete.
- self inputField delete.
- self buttonVerify delete.
- self buttonBack delete.
- self errorLabel delete.
- self showFirstStep.
-
-
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNext..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNext..st
deleted file mode 100644
index 1dbb10f10..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNext..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-buttonNext: aTCButton
-
- buttonNext := aTCButton
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNext.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNext.st
deleted file mode 100644
index 611133c49..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNext.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-buttonNext
-
- ^ buttonNext
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNextPressed.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNextPressed.st
deleted file mode 100644
index b4d9e97b2..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonNextPressed.st
+++ /dev/null
@@ -1,7 +0,0 @@
-initialization
-buttonNextPressed
-
- "call to API here"
- self buttonNext delete.
- self showSecondStep.
- self errorLabel delete.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonVerify..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonVerify..st
deleted file mode 100644
index 74e3537e5..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonVerify..st
+++ /dev/null
@@ -1,4 +0,0 @@
-initialization
-buttonVerify: aButton
-
- buttonVerify := aButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonVerify.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonVerify.st
deleted file mode 100644
index 6fb382315..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonVerify.st
+++ /dev/null
@@ -1,4 +0,0 @@
-initialization
-buttonVerify
-
- ^ buttonVerify
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createErrorLabel..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createErrorLabel..st
deleted file mode 100644
index 2c54fd1ce..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createErrorLabel..st
+++ /dev/null
@@ -1,11 +0,0 @@
-initialization
-createErrorLabel: aString
-
- self errorLabel: (TextMorph new
- contents: aString asText;
- center: (self center + (0 @ (self defaultExtent y / 3)));
- color: Color red;
- lock).
-
- self addMorph: self errorLabel.
-
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createInputField..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createInputField..st
deleted file mode 100644
index 892f22466..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createInputField..st
+++ /dev/null
@@ -1,12 +0,0 @@
-initialization
-createInputField: aString
-
- self inputField: (TextMorph new
- contentsWrapped: aString asText;
- extent: 150@ 50;
- borderColor: TCDefaultValues colorGray;
- borderWidth: 1;
- center: self instructionLabel center + (0 @ 30)).
-
- ^ inputField
-
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createLabel..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createLabel..st
deleted file mode 100644
index a08bb615a..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/createLabel..st
+++ /dev/null
@@ -1,8 +0,0 @@
-initialization
-createLabel: aString
-
- self instructionLabel: (TextMorph new
- contents: aString asText;
- lock).
-
- ^ self instructionLabel
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/defaultExtent.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/defaultExtent.st
deleted file mode 100644
index a087e83ee..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/defaultExtent.st
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultValues
-defaultExtent
-
- ^ 600 @ 400
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/defaultInputWidth.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/defaultInputWidth.st
deleted file mode 100644
index 889c910eb..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/defaultInputWidth.st
+++ /dev/null
@@ -1,4 +0,0 @@
-initialization
-defaultInputWidth
-
- ^ 150
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/errorLabel..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/errorLabel..st
deleted file mode 100644
index b548c3f1e..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/errorLabel..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-errorLabel: aMorph
-
- errorLabel := aMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/errorLabel.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/errorLabel.st
deleted file mode 100644
index 11422c1cd..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/errorLabel.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-errorLabel
-
- ^ errorLabel
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/initialize.st
deleted file mode 100644
index b54053bfe..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/initialize.st
+++ /dev/null
@@ -1,12 +0,0 @@
-initialization
-initialize
-
- super initialize.
- self
- extent: self defaultExtent;
- color: Color white;
- borderWidth: 1;
- borderColor: TCDefaultValues colorGray;
- addHeader;
- showFirstStep;
- openCenteredInWorld.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/inputField..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/inputField..st
deleted file mode 100644
index ec289a9e3..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/inputField..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-inputField: aMoprh
-
- inputField := aMoprh.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/inputField.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/inputField.st
deleted file mode 100644
index 6c08cb638..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/inputField.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-inputField
-
- ^ inputField
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/instructionLabel..st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/instructionLabel..st
deleted file mode 100644
index 235359477..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/instructionLabel..st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-instructionLabel: aMorph
-
- instructionLabel := aMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/instructionLabel.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/instructionLabel.st
deleted file mode 100644
index 7edeb9ea4..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/instructionLabel.st
+++ /dev/null
@@ -1,4 +0,0 @@
-accessing
-instructionLabel
-
- ^ instructionLabel
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/showFirstStep.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/showFirstStep.st
deleted file mode 100644
index a9b95d071..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/showFirstStep.st
+++ /dev/null
@@ -1,12 +0,0 @@
-initialization
-showFirstStep
-
- self
- addMorphCentered: (self createLabel: 'Enter Phone number');
- addMorph: (self createInputField: '+49');
- buttonNext: (TCButton new
- text: 'Next';
- center: inputField center + (0 @ 50);
- on: #mouseDown send: #buttonNextPressed to: self);
- addMorph: buttonNext;
- createErrorLabel: ''.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/showSecondStep.st b/packages/TelegramClient-UI.package/TCAuthentication.class/instance/showSecondStep.st
deleted file mode 100644
index 38324d7ef..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/showSecondStep.st
+++ /dev/null
@@ -1,19 +0,0 @@
-initialization
-showSecondStep
-
- self instructionLabel
- contents: 'Enter the code your recieved on your phone';
- center: self center.
-
- self inputField contents: ' '.
-
- self
- buttonBack: (TCButton new
- text: '<- Back';
- center: self inputField center + ((-70) @ 50);
- on: #mouseDown send: #buttonBackPressed to: self);
- buttonVerify: (TCButton new
- text: 'Verify';
- center: self inputField center + (70 @ 50));
- "addMorph: self buttonBack;"
- addMorph: self buttonVerify.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/methodProperties.json b/packages/TelegramClient-UI.package/TCAuthentication.class/methodProperties.json
deleted file mode 100644
index 636f69250..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/methodProperties.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "addHeader" : "R.S 5/10/2020 17:24",
- "addTitle:to:" : "R.S 5/7/2020 20:50",
- "buttonBack" : "R.S 5/11/2020 16:58",
- "buttonBack:" : "R.S 5/11/2020 16:59",
- "buttonBackPressed" : "R.S 5/12/2020 12:45",
- "buttonNext" : "R.S 5/11/2020 16:52",
- "buttonNext:" : "R.S 5/11/2020 16:52",
- "buttonNextPressed" : "R.S 5/12/2020 12:31",
- "buttonVerify" : "R.S 5/11/2020 16:57",
- "buttonVerify:" : "R.S 5/11/2020 16:59",
- "createErrorLabel:" : "R.S 5/12/2020 12:35",
- "createInputField:" : "R.S 5/19/2020 09:54",
- "createLabel:" : "R.S 5/19/2020 09:55",
- "defaultExtent" : "R.S 5/7/2020 14:55",
- "defaultInputWidth" : "R.S 5/10/2020 12:17",
- "errorLabel" : "R.S 5/12/2020 12:27",
- "errorLabel:" : "R.S 5/12/2020 12:27",
- "initialize" : "R.S 5/19/2020 09:51",
- "inputField" : "R.S 5/10/2020 14:40",
- "inputField:" : "R.S 5/10/2020 14:40",
- "instructionLabel" : "R.S 5/19/2020 09:55",
- "instructionLabel:" : "R.S 5/19/2020 09:55",
- "showFirstStep" : "R.S 5/12/2020 12:45",
- "showSecondStep" : "R.S 5/19/2020 10:49" } }
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/properties.json b/packages/TelegramClient-UI.package/TCAuthentication.class/properties.json
deleted file mode 100644
index 0311f3dc4..000000000
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/properties.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "category" : "TelegramClient-UI",
- "classinstvars" : [
- ],
- "classvars" : [
- ],
- "commentStamp" : "",
- "instvars" : [
- "inputField",
- "instructionLabel",
- "errorLabel",
- "buttonVerify",
- "buttonNext",
- "buttonBack" ],
- "name" : "TCAuthentication",
- "pools" : [
- ],
- "super" : "RectangleMorph",
- "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCButton.class/README.md b/packages/TelegramClient-UI.package/TCButton.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-UI.package/TCButton.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCButton.class/instance/initialize.st
deleted file mode 100644
index b7410263b..000000000
--- a/packages/TelegramClient-UI.package/TCButton.class/instance/initialize.st
+++ /dev/null
@@ -1,9 +0,0 @@
-initialization
-initialize
-
- super initialize.
- self
- useRoundedCorners;
- color: TCDefaultValues colorLightBlue;
- extent: (100 @ 30);
- borderWidth: 0.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCButton.class/instance/text..st b/packages/TelegramClient-UI.package/TCButton.class/instance/text..st
deleted file mode 100644
index 2a33c699e..000000000
--- a/packages/TelegramClient-UI.package/TCButton.class/instance/text..st
+++ /dev/null
@@ -1,9 +0,0 @@
-accessing
-text: aString
-
- text := TextMorph new.
- text
- contents: aString asText;
- lock.
-
- self addMorphCentered: text.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCButton.class/methodProperties.json b/packages/TelegramClient-UI.package/TCButton.class/methodProperties.json
deleted file mode 100644
index 69005eb6e..000000000
--- a/packages/TelegramClient-UI.package/TCButton.class/methodProperties.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "class" : {
- },
- "instance" : {
- "initialize" : "R.S 5/10/2020 17:05",
- "text" : "R.S 5/19/2020 09:57",
- "text:" : "R.S 5/10/2020 17:11" } }
diff --git a/packages/TelegramClient-UI.package/TCButton.class/properties.json b/packages/TelegramClient-UI.package/TCButton.class/properties.json
deleted file mode 100644
index 755e5184d..000000000
--- a/packages/TelegramClient-UI.package/TCButton.class/properties.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "category" : "TelegramClient-UI",
- "classinstvars" : [
- ],
- "classvars" : [
- ],
- "commentStamp" : "",
- "instvars" : [
- "text" ],
- "name" : "TCButton",
- "pools" : [
- ],
- "super" : "RectangleMorph",
- "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCDefaultValues.class/README.md b/packages/TelegramClient-UI.package/TCDefaultValues.class/README.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/TelegramClient-UI.package/TCDefaultValues.class/class/colorGray.st b/packages/TelegramClient-UI.package/TCDefaultValues.class/class/colorGray.st
deleted file mode 100644
index ca71420f0..000000000
--- a/packages/TelegramClient-UI.package/TCDefaultValues.class/class/colorGray.st
+++ /dev/null
@@ -1,4 +0,0 @@
-colors
-colorGray
-
- ^ (Color r: (53 /255) g: (60 / 255) b: (74 / 255))
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCDefaultValues.class/class/colorLightBlue.st b/packages/TelegramClient-UI.package/TCDefaultValues.class/class/colorLightBlue.st
deleted file mode 100644
index 62ab12bf2..000000000
--- a/packages/TelegramClient-UI.package/TCDefaultValues.class/class/colorLightBlue.st
+++ /dev/null
@@ -1,4 +0,0 @@
-colors
-colorLightBlue
-
- ^ (Color r: (64 /255) g: (167 / 255) b: (227 / 255))
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCDefaultValues.class/methodProperties.json b/packages/TelegramClient-UI.package/TCDefaultValues.class/methodProperties.json
deleted file mode 100644
index 473020ab7..000000000
--- a/packages/TelegramClient-UI.package/TCDefaultValues.class/methodProperties.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "class" : {
- "colorGray" : "R.S 5/7/2020 20:03",
- "colorLightBlue" : "R.S 5/7/2020 20:51" },
- "instance" : {
- } }
diff --git a/packages/TelegramClient-UI.package/TCDefaultValues.class/properties.json b/packages/TelegramClient-UI.package/TCDefaultValues.class/properties.json
deleted file mode 100644
index b59212630..000000000
--- a/packages/TelegramClient-UI.package/TCDefaultValues.class/properties.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "category" : "TelegramClient-UI",
- "classinstvars" : [
- ],
- "classvars" : [
- ],
- "commentStamp" : "",
- "instvars" : [
- ],
- "name" : "TCDefaultValues",
- "pools" : [
- ],
- "super" : "Object",
- "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/README.md b/packages/TelegramClient-UI.package/TCUAuthentication.class/README.md
new file mode 100644
index 000000000..d5057721d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/README.md
@@ -0,0 +1 @@
+View for authentication
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUApp.class/class/newWithCore..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/class/newWithCore..st
similarity index 100%
rename from TelegramClient-UI.package/TCUApp.class/class/newWithCore..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/class/newWithCore..st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/addHeader.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/addHeader.st
similarity index 71%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/addHeader.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/addHeader.st
index 969695c07..ac51e89ed 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/addHeader.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/addHeader.st
@@ -1,12 +1,12 @@
-initialization
+drawing
addHeader
| header |
header := RectangleMorph new
borderWidth: 0;
color: TCUDefaultValues colorGray;
- extent: self width @ 40.
-
- self
+ extent: self width @ self defaultHeaderHeight.
+
+ self
addMorph: header;
addTitle: 'Telegram' to: header.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/addTitle.to..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/addTitle.to..st
similarity index 86%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/addTitle.to..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/addTitle.to..st
index 2c96d39ea..805810b84 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/addTitle.to..st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/addTitle.to..st
@@ -1,10 +1,11 @@
-initialization
+drawing
addTitle: aString to: aMorph
| titleLable font |
font := (TextFontReference toFont: (StrikeFont familyName: 'DefaultTextStyle' size: 35)).
titleLable := TextMorph new
contents: (aString asText addAttribute: font);
- color: Color white.
-
+ color: Color white;
+ lock.
+
aMorph addMorphCentered: titleLable.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBack..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBack..st
similarity index 74%
rename from packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBack..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBack..st
index 994d8536b..c1a24e0e1 100644
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBack..st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBack..st
@@ -1,4 +1,4 @@
-initialization
+accessing
buttonBack: aButton
buttonBack := aButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBack.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBack.st
similarity index 62%
rename from packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBack.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBack.st
index 97e81cacb..e8f208f02 100644
--- a/packages/TelegramClient-UI.package/TCAuthentication.class/instance/buttonBack.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBack.st
@@ -1,4 +1,4 @@
-initialization
+accessing
buttonBack
^ buttonBack
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBackPressed.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBackPressed.st
new file mode 100644
index 000000000..f758b7fa9
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonBackPressed.st
@@ -0,0 +1,4 @@
+event handling
+buttonBackPressed
+
+ self showFirstStep.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext..st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext..st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNext.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNextPressed.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNextPressed.st
similarity index 77%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNextPressed.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNextPressed.st
index 42c8f1ef0..c7bc23ae2 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNextPressed.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonNextPressed.st
@@ -1,4 +1,4 @@
-accessing
+core communication
buttonNextPressed
-
+
self core sendPhoneNumber: self inputField text.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify..st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify..st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerify.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerifyPressed.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerifyPressed.st
similarity index 83%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerifyPressed.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerifyPressed.st
index f59225156..52fa54431 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerifyPressed.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/buttonVerifyPressed.st
@@ -1,4 +1,4 @@
-initialization
+event handling
buttonVerifyPressed
self core checkAuthenticationCode: self inputField text.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/core..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/core..st
similarity index 58%
rename from TelegramClient-UI.package/TCUMain.class/instance/core..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/core..st
index 4e9818803..3844709d3 100644
--- a/TelegramClient-UI.package/TCUMain.class/instance/core..st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/core..st
@@ -1,4 +1,4 @@
accessing
core: aCore
- core := aCore.
+ core := aCore.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/core.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/core.st
new file mode 100644
index 000000000..7652dd8d1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/core.st
@@ -0,0 +1,4 @@
+accessing
+core
+
+ ^ core
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonBack.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonBack.st
new file mode 100644
index 000000000..c30a7ae0c
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonBack.st
@@ -0,0 +1,10 @@
+initialization
+createButtonBack
+
+ self
+ buttonBack: (TCUButton new
+ text: 'Back';
+ center: self inputField center + ((-100) @ 50);
+ hide;
+ on: #mouseDown send: #buttonBackPressed to: self);
+ addMorph: self buttonBack.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonNext.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonNext.st
new file mode 100644
index 000000000..7efe43d68
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonNext.st
@@ -0,0 +1,10 @@
+initialization
+createButtonNext
+
+ self
+ buttonNext: (TCUButton new
+ text: 'Next';
+ center: self inputField center + (100 @ 50);
+ hide;
+ on: #mouseDown send: #buttonNextPressed to: self);
+ addMorph: self buttonNext.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonVerify.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonVerify.st
new file mode 100644
index 000000000..27a37dbf0
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createButtonVerify.st
@@ -0,0 +1,10 @@
+initialization
+createButtonVerify
+
+ self
+ buttonVerify: (TCUButton new
+ text: 'Verify';
+ center: self inputField center + (70 @ 50);
+ on: #mouseDown send: #buttonVerifyPressed to: self;
+ hide);
+ addMorph: self buttonVerify.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createErrorLabel..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createErrorLabel..st
new file mode 100644
index 000000000..87daa5046
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createErrorLabel..st
@@ -0,0 +1,10 @@
+initialization
+createErrorLabel: aString
+
+ self
+ errorLabel: (TextMorph new
+ contents: aString asText;
+ center: (self center + (0 @ (self defaultExtent y / 3)));
+ color: Color red;
+ lock);
+ addMorph: self errorLabel.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createInputField..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createInputField..st
new file mode 100644
index 000000000..c6c65000a
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createInputField..st
@@ -0,0 +1,12 @@
+initialization
+createInputField: aString
+
+ self
+ inputField: (TextMorph new
+ contentsWrapped: aString asText;
+ extent: self defaultInputWidth @ 50;
+ borderColor: TCUDefaultValues colorGray;
+ borderWidth: 1;
+ center: self instructionLabel center + (0 @ 30);
+ hide);
+ addMorph: self inputField.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/createLabel..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createLabel..st
similarity index 98%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/createLabel..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createLabel..st
index a08bb615a..839b107ae 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/createLabel..st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/createLabel..st
@@ -4,5 +4,5 @@ createLabel: aString
self instructionLabel: (TextMorph new
contents: aString asText;
lock).
-
+
^ self instructionLabel
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultExtent.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultExtent.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/defaultExtent.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultExtent.st
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/defaultHeaderHeight.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultHeaderHeight.st
similarity index 100%
rename from TelegramClient-UI.package/TCUMain.class/instance/defaultHeaderHeight.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultHeaderHeight.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultInputWidth.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultInputWidth.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/defaultInputWidth.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/defaultInputWidth.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/delete.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/delete.st
similarity index 68%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/delete.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/delete.st
index 77eec1260..d931c9f03 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/delete.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/delete.st
@@ -1,4 +1,4 @@
-initialization
+submorphs-add/remove
delete
self core client free.
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel..st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel..st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/errorLabel.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/initialize.st
similarity index 87%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/initialize.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/initialize.st
index 39bcfec89..7f1315fd1 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/initialize.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/initialize.st
@@ -2,7 +2,7 @@ initialization
initialize
super initialize.
- self
+ self
subscribeCore;
extent: self defaultExtent;
color: Color white;
@@ -10,4 +10,4 @@ initialize
borderColor: TCUDefaultValues colorGray;
addHeader;
showLoadingMessage;
- openCenteredInWorld.
\ No newline at end of file
+ initializeMorphs.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/initializeMorphs.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/initializeMorphs.st
new file mode 100644
index 000000000..b106cc7bf
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/initializeMorphs.st
@@ -0,0 +1,9 @@
+initialization
+initializeMorphs
+
+ self
+ createInputField: '+49';
+ createButtonNext;
+ createErrorLabel: '';
+ createButtonBack;
+ createButtonVerify.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/inputField..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/inputField..st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/inputField..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/inputField..st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/inputField.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/inputField.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/inputField.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/inputField.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel..st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel..st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel..st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel..st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel.st
similarity index 100%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/instructionLabel.st
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/logInCompleted.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/logInCompleted.st
similarity index 68%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/logInCompleted.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/logInCompleted.st
index 38ce3e4a7..fae9e6ceb 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/logInCompleted.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/logInCompleted.st
@@ -1,5 +1,5 @@
-initialization
-logInCompleted
+event handling
+logInCompleted
(TCUMain newWithCore: self core) openCenteredInWorld.
super delete.
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showFirstStep.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showFirstStep.st
new file mode 100644
index 000000000..1f10c7966
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showFirstStep.st
@@ -0,0 +1,13 @@
+drawing
+showFirstStep
+
+ self instructionLabel
+ contents: 'Enter your telephone number: ' asText;
+ center: self center.
+
+ self buttonVerify hide.
+ self inputField
+ show;
+ crAction: [self buttonNextPressed].
+ self buttonNext show.
+ self instructionLabel show.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/showLoadingMessage.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showLoadingMessage.st
similarity index 71%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/showLoadingMessage.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showLoadingMessage.st
index 8b92c0d52..c41342646 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/showLoadingMessage.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showLoadingMessage.st
@@ -1,8 +1,4 @@
-initialization
+drawing
showLoadingMessage
- self addMorphCentered: (self createLabel: 'Trying to connect to TDLib...').
-
-
-
-
\ No newline at end of file
+ self addMorphCentered: (self createLabel: 'Trying to connect to TDLib...').
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showSecondStep.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showSecondStep.st
new file mode 100644
index 000000000..a3d5342a6
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/showSecondStep.st
@@ -0,0 +1,15 @@
+drawing
+showSecondStep
+
+ self buttonNext hide.
+ self buttonBack show.
+ self buttonVerify show.
+
+ self instructionLabel
+ contents: 'Enter the code your recieved on your phone';
+ center: self center.
+
+ self inputField
+ contents: ' ';
+ crAction: [self buttonVerifyPressed].
+ self errorLabel hide.
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/instance/subscribeCore.st b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/subscribeCore.st
similarity index 90%
rename from TelegramClient-UI.package/TCUAuthentication.class/instance/subscribeCore.st
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/instance/subscribeCore.st
index 6c86f82cc..26b13a30a 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/instance/subscribeCore.st
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/instance/subscribeCore.st
@@ -1,4 +1,4 @@
-accessing
+core communication
subscribeCore
self core
diff --git a/packages/TelegramClient-UI.package/TCUAuthentication.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUAuthentication.class/methodProperties.json
new file mode 100644
index 000000000..f5f43258b
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/methodProperties.json
@@ -0,0 +1,40 @@
+{
+ "class" : {
+ "newWithCore:" : "R.S 5/31/2020 20:16" },
+ "instance" : {
+ "addHeader" : "r.s 8/2/2020 21:29",
+ "addTitle:to:" : "N.S. 7/26/2020 15:52",
+ "buttonBack" : "rs 6/11/2020 18:53",
+ "buttonBack:" : "rs 6/11/2020 18:53",
+ "buttonBackPressed" : "rs 6/11/2020 19:00",
+ "buttonNext" : "R.S 5/20/2020 13:50",
+ "buttonNext:" : "js 5/28/2020 17:49",
+ "buttonNextPressed" : "js 6/13/2020 18:12",
+ "buttonVerify" : "R.S 5/20/2020 13:50",
+ "buttonVerify:" : "R.S 5/20/2020 13:50",
+ "buttonVerifyPressed" : "js 5/31/2020 20:10",
+ "core" : "js 6/13/2020 18:43",
+ "core:" : "R.S 5/31/2020 20:18",
+ "createButtonBack" : "js 7/31/2020 15:17",
+ "createButtonNext" : "js 7/31/2020 15:17",
+ "createButtonVerify" : "js 6/13/2020 18:44",
+ "createErrorLabel:" : "js 7/31/2020 15:18",
+ "createInputField:" : "js 7/31/2020 15:18",
+ "createLabel:" : "js 6/13/2020 18:13",
+ "defaultExtent" : "R.S 5/20/2020 13:51",
+ "defaultHeaderHeight" : "r.s 8/2/2020 21:29",
+ "defaultInputWidth" : "R.S 5/20/2020 13:51",
+ "delete" : "f.w. 6/3/2020 20:51",
+ "errorLabel" : "R.S 5/20/2020 13:51",
+ "errorLabel:" : "R.S 5/20/2020 13:51",
+ "initialize" : "js 6/13/2020 18:44",
+ "initializeMorphs" : "js 5/29/2020 20:11",
+ "inputField" : "R.S 5/20/2020 13:51",
+ "inputField:" : "js 5/31/2020 20:07",
+ "instructionLabel" : "R.S 5/20/2020 13:52",
+ "instructionLabel:" : "js 5/28/2020 17:51",
+ "logInCompleted" : "js 8/1/2020 12:08",
+ "showFirstStep" : "js 7/31/2020 15:19",
+ "showLoadingMessage" : "js 6/13/2020 18:45",
+ "showSecondStep" : "rs 7/6/2020 17:29",
+ "subscribeCore" : "R.S 5/31/2020 20:21" } }
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/properties.json b/packages/TelegramClient-UI.package/TCUAuthentication.class/properties.json
similarity index 81%
rename from TelegramClient-UI.package/TCUAuthentication.class/properties.json
rename to packages/TelegramClient-UI.package/TCUAuthentication.class/properties.json
index d434b03bd..76839fb03 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUAuthentication.class/properties.json
@@ -4,16 +4,15 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 18:59",
"instvars" : [
"buttonNext",
"buttonVerify",
"errorLabel",
"inputField",
"instructionLabel",
- "event",
- "authState",
- "core" ],
+ "core",
+ "buttonBack" ],
"name" : "TCUAuthentication",
"pools" : [
],
diff --git a/packages/TelegramClient-UI.package/TCUButton.class/README.md b/packages/TelegramClient-UI.package/TCUButton.class/README.md
new file mode 100644
index 000000000..0722413fe
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUButton.class/README.md
@@ -0,0 +1 @@
+a custom button everywhere in TC-UI
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUButton.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUButton.class/instance/initialize.st
similarity index 99%
rename from TelegramClient-UI.package/TCUButton.class/instance/initialize.st
rename to packages/TelegramClient-UI.package/TCUButton.class/instance/initialize.st
index 76a8c0ec5..eefbcdf89 100644
--- a/TelegramClient-UI.package/TCUButton.class/instance/initialize.st
+++ b/packages/TelegramClient-UI.package/TCUButton.class/instance/initialize.st
@@ -2,6 +2,7 @@ initialization
initialize
super initialize.
+
self
useRoundedCorners;
color: TCUDefaultValues colorLightBlue;
diff --git a/TelegramClient-UI.package/TCUButton.class/instance/text..st b/packages/TelegramClient-UI.package/TCUButton.class/instance/text..st
similarity index 77%
rename from TelegramClient-UI.package/TCUButton.class/instance/text..st
rename to packages/TelegramClient-UI.package/TCUButton.class/instance/text..st
index 56588c504..f2581f1a2 100644
--- a/TelegramClient-UI.package/TCUButton.class/instance/text..st
+++ b/packages/TelegramClient-UI.package/TCUButton.class/instance/text..st
@@ -4,5 +4,6 @@ text: aString
text := TextMorph new
contents: aString asText;
lock.
-
+
+ self text color: Color white.
self addMorphCentered: text.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUButton.class/instance/text.st b/packages/TelegramClient-UI.package/TCUButton.class/instance/text.st
similarity index 100%
rename from TelegramClient-UI.package/TCUButton.class/instance/text.st
rename to packages/TelegramClient-UI.package/TCUButton.class/instance/text.st
diff --git a/packages/TelegramClient-UI.package/TCUButton.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUButton.class/methodProperties.json
new file mode 100644
index 000000000..0cd0c1ab5
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUButton.class/methodProperties.json
@@ -0,0 +1,7 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "initialize" : "js 6/13/2020 18:22",
+ "text" : "R.S 5/20/2020 13:56",
+ "text:" : "N.S. 7/26/2020 15:46" } }
diff --git a/TelegramClient-UI.package/TCUButton.class/properties.json b/packages/TelegramClient-UI.package/TCUButton.class/properties.json
similarity index 83%
rename from TelegramClient-UI.package/TCUButton.class/properties.json
rename to packages/TelegramClient-UI.package/TCUButton.class/properties.json
index 06ffa7012..9b1053c83 100644
--- a/TelegramClient-UI.package/TCUButton.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUButton.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 19:00",
"instvars" : [
"text" ],
"name" : "TCUButton",
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/README.md b/packages/TelegramClient-UI.package/TCUChatListItem.class/README.md
new file mode 100644
index 000000000..bc1dad1cc
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/README.md
@@ -0,0 +1 @@
+an entry in the side view of TCUMain
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/class/newWithChat.width..st b/packages/TelegramClient-UI.package/TCUChatListItem.class/class/newWithChat.width..st
new file mode 100644
index 000000000..ae1143aa4
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/class/newWithChat.width..st
@@ -0,0 +1,10 @@
+instance creation
+newWithChat: aChat width: aWidth
+
+ ^ self new
+ chat: aChat;
+ width: aWidth;
+ addTitle;
+ addLastMessage;
+ addBorder;
+ yourself
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/instance/addBorder.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addBorder.st
similarity index 56%
rename from TelegramClient-UI.package/TCUChatListItem.class/instance/addBorder.st
rename to packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addBorder.st
index ac2a79d6a..7073c70bb 100644
--- a/TelegramClient-UI.package/TCUChatListItem.class/instance/addBorder.st
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addBorder.st
@@ -1,8 +1,8 @@
-initialization
+drawing
addBorder
self addMorph: (Morph new
width: self width;
color: Color black;
height: 1;
- position: (self position + (0 @ self defaultHeight))).
\ No newline at end of file
+ position: (self position + (0 @ (self defaultHeight - 1)))).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addLastMessage.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addLastMessage.st
new file mode 100644
index 000000000..f4a1bd26d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addLastMessage.st
@@ -0,0 +1,7 @@
+drawing
+addLastMessage
+
+ self addMorph: (TextMorph new
+ contents: (self chat lastMessage condensedIntoOneLine truncateWithElipsisTo: self messagePreviewLength) asText;
+ bottomLeft: self bottomLeft + self lastMessageOffset;
+ lock).
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addTitle.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addTitle.st
new file mode 100644
index 000000000..de4367a62
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/addTitle.st
@@ -0,0 +1,7 @@
+drawing
+addTitle
+
+ self addMorph: (TextMorph new
+ position: self topLeft + self titleOffset;
+ contents: ((self chatName condensedIntoOneLine truncateWithElipsisTo: self titleLength) asText addAttribute: TextEmphasis bold);
+ lock).
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chat..st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chat..st
new file mode 100644
index 000000000..3f6d8c03a
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chat..st
@@ -0,0 +1,4 @@
+accessing
+chat: aChat
+
+ chat := aChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chat.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chat.st
new file mode 100644
index 000000000..207f37ad7
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chat.st
@@ -0,0 +1,4 @@
+accessing
+chat
+
+ ^ chat
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chatID.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chatID.st
new file mode 100644
index 000000000..06c899df0
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chatID.st
@@ -0,0 +1,4 @@
+accessing
+chatID
+
+ ^ self chat id
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName.st
similarity index 52%
rename from TelegramClient-UI.package/TCUChatListItem.class/instance/chatName.st
rename to packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName.st
index a6c62707a..daa54655b 100644
--- a/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName.st
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/chatName.st
@@ -1,4 +1,4 @@
accessing
chatName
- ^ chatName
\ No newline at end of file
+ ^ self chat title
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/defaultHeight.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/defaultHeight.st
new file mode 100644
index 000000000..75eced192
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/defaultHeight.st
@@ -0,0 +1,4 @@
+default values
+defaultHeight
+
+ ^ 80
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/deselect.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/deselect.st
new file mode 100644
index 000000000..337611f7d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/deselect.st
@@ -0,0 +1,4 @@
+event handling
+deselect
+
+ self color: Color white.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/initialize.st
similarity index 67%
rename from TelegramClient-UI.package/TCUChatListItem.class/instance/initialize.st
rename to packages/TelegramClient-UI.package/TCUChatListItem.class/instance/initialize.st
index 2c8440910..9c5e90bb2 100644
--- a/TelegramClient-UI.package/TCUChatListItem.class/instance/initialize.st
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/initialize.st
@@ -2,7 +2,9 @@ initialization
initialize
super initialize.
- self
+
+ self
color: Color white;
height: self defaultHeight;
- borderWidth: 0.
\ No newline at end of file
+ borderWidth: 0;
+ clipSubmorphs: true.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/lastMessageOffset.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/lastMessageOffset.st
new file mode 100644
index 000000000..70a28f62b
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/lastMessageOffset.st
@@ -0,0 +1,4 @@
+default values
+lastMessageOffset
+
+ ^ 20 @ -12
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/messageMarginTop.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/messageMarginTop.st
new file mode 100644
index 000000000..e35b88516
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/messageMarginTop.st
@@ -0,0 +1,4 @@
+default values
+messageMarginTop
+
+ ^ 20
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/messagePreviewLength.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/messagePreviewLength.st
new file mode 100644
index 000000000..d2e385c61
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/messagePreviewLength.st
@@ -0,0 +1,4 @@
+default values
+messagePreviewLength
+
+ ^ 37
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/select.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/select.st
new file mode 100644
index 000000000..b243bca78
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/select.st
@@ -0,0 +1,4 @@
+event handling
+select
+
+ self color: TCUDefaultValues colorLightBlue.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/titleLength.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/titleLength.st
new file mode 100644
index 000000000..3b533c8ae
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/titleLength.st
@@ -0,0 +1,4 @@
+default values
+titleLength
+
+ ^ 32
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/titleOffset.st b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/titleOffset.st
new file mode 100644
index 000000000..1c813f836
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/instance/titleOffset.st
@@ -0,0 +1,4 @@
+default values
+titleOffset
+
+ ^ 20 @ 20
diff --git a/packages/TelegramClient-UI.package/TCUChatListItem.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUChatListItem.class/methodProperties.json
new file mode 100644
index 000000000..078534540
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/methodProperties.json
@@ -0,0 +1,20 @@
+{
+ "class" : {
+ "newWithChat:width:" : "js 7/31/2020 18:48" },
+ "instance" : {
+ "addBorder" : "r.s 7/31/2020 14:43",
+ "addLastMessage" : "js 8/2/2020 09:58",
+ "addTitle" : "js 8/2/2020 09:58",
+ "chat" : "rs 6/17/2020 21:45",
+ "chat:" : "rs 6/17/2020 21:45",
+ "chatID" : "rs 6/17/2020 23:05",
+ "chatName" : "rs 6/17/2020 21:45",
+ "defaultHeight" : "rs 7/4/2020 18:54",
+ "deselect" : "rs 6/13/2020 09:02",
+ "initialize" : "r.s 7/31/2020 14:43",
+ "lastMessageOffset" : "r.s 7/31/2020 16:05",
+ "messageMarginTop" : "r.s 7/31/2020 14:18",
+ "messagePreviewLength" : "js 8/2/2020 10:06",
+ "select" : "rs 6/13/2020 08:49",
+ "titleLength" : "js 8/2/2020 10:00",
+ "titleOffset" : "r.s 7/31/2020 16:04" } }
diff --git a/TelegramClient-UI.package/TCUChatListItem.class/properties.json b/packages/TelegramClient-UI.package/TCUChatListItem.class/properties.json
similarity index 79%
rename from TelegramClient-UI.package/TCUChatListItem.class/properties.json
rename to packages/TelegramClient-UI.package/TCUChatListItem.class/properties.json
index 9db8900e4..0097c287b 100644
--- a/TelegramClient-UI.package/TCUChatListItem.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUChatListItem.class/properties.json
@@ -4,9 +4,9 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 19:00",
"instvars" : [
- "chatName" ],
+ "chat" ],
"name" : "TCUChatListItem",
"pools" : [
],
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/README.md b/packages/TelegramClient-UI.package/TCUChatMessageList.class/README.md
new file mode 100644
index 000000000..525914450
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/README.md
@@ -0,0 +1 @@
+displays a list of messages in a TCUChatsWindow
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addMessageAtBottom..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addMessageAtBottom..st
new file mode 100644
index 000000000..6c80ac0af
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addMessageAtBottom..st
@@ -0,0 +1,13 @@
+messages
+addMessageAtBottom: aMessage
+
+ | newMessage |
+ newMessage := TCUMessage newFromTCCMessage: aMessage.
+
+ self messages do: [:message | message position: (message position - (0 @ (newMessage height)))].
+
+ newMessage isOutgoing
+ ifTrue: [newMessage bottomRight: (self bottomRight - (self defaultMessageMargin @ 0))]
+ ifFalse: [newMessage bottomLeft: (self bottomLeft + (self defaultMessageMargin @ 0))].
+ self addMorph: newMessage.
+ self messages add: newMessage.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addMessages.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addMessages.st
new file mode 100644
index 000000000..57486604d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addMessages.st
@@ -0,0 +1,4 @@
+messages
+addMessages
+
+ self showChatMessagesFrom: self lowestVisibleMessage.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/chat..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/chat..st
new file mode 100644
index 000000000..3f6d8c03a
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/chat..st
@@ -0,0 +1,4 @@
+accessing
+chat: aChat
+
+ chat := aChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/chat.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/chat.st
new file mode 100644
index 000000000..207f37ad7
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/chat.st
@@ -0,0 +1,4 @@
+accessing
+chat
+
+ ^ chat
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/clearMessages.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/clearMessages.st
new file mode 100644
index 000000000..d82a90b50
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/clearMessages.st
@@ -0,0 +1,5 @@
+messages
+clearMessages
+
+ self messages do: [:aMessage | aMessage delete].
+ self messages removeAll.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/core.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/core.st
new file mode 100644
index 000000000..44e3b7100
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/core.st
@@ -0,0 +1,4 @@
+event handling
+core
+
+ ^ self owner core
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/defaultMessageMargin.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/defaultMessageMargin.st
new file mode 100644
index 000000000..d9e9bd92e
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/defaultMessageMargin.st
@@ -0,0 +1,4 @@
+default values
+defaultMessageMargin
+
+ ^ 10
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/displayChat..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/displayChat..st
new file mode 100644
index 000000000..d7167349c
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/displayChat..st
@@ -0,0 +1,9 @@
+messages
+displayChat: aChat
+
+ self chat removeActionsWithReceiver: self.
+ aChat when: #newMessage send: #addMessages to: self.
+ self
+ chat: aChat;
+ lowestVisibleMessage: 0;
+ addMessages.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/handleMouseWheel..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/handleMouseWheel..st
new file mode 100644
index 000000000..e783de544
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/handleMouseWheel..st
@@ -0,0 +1,5 @@
+event handling
+handleMouseWheel: anEvent
+
+ anEvent isWheelUp ifTrue: [self scrollUp].
+ anEvent isWheelDown ifTrue: [self scrollDown].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/initialize.st
new file mode 100644
index 000000000..c3a4ad22c
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/initialize.st
@@ -0,0 +1,9 @@
+initialization
+initialize
+
+ super initialize.
+
+ self
+ chat: TCCNullChat new;
+ clipSubmorphs: true;
+ messages: OrderedCollection new.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/lowestVisibleMessage..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/lowestVisibleMessage..st
new file mode 100644
index 000000000..47a72f80d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/lowestVisibleMessage..st
@@ -0,0 +1,4 @@
+accessing
+lowestVisibleMessage: anInteger
+
+ lowestVisibleMessage := anInteger.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/lowestVisibleMessage.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/lowestVisibleMessage.st
new file mode 100644
index 000000000..82ef00237
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/lowestVisibleMessage.st
@@ -0,0 +1,4 @@
+accessing
+lowestVisibleMessage
+
+ ^ lowestVisibleMessage
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/messages..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/messages..st
new file mode 100644
index 000000000..781846dba
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/messages..st
@@ -0,0 +1,4 @@
+accessing
+messages: anOrderedList
+
+ messages := anOrderedList.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/messages.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/messages.st
new file mode 100644
index 000000000..212d127b2
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/messages.st
@@ -0,0 +1,4 @@
+accessing
+messages
+
+ ^ messages
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollDown.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollDown.st
new file mode 100644
index 000000000..f18559d96
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollDown.st
@@ -0,0 +1,5 @@
+event handling
+scrollDown
+
+ self lowestVisibleMessage < 1 ifFalse: [
+ self showChatMessagesFrom: self lowestVisibleMessage - 1.].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollUp.st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollUp.st
new file mode 100644
index 000000000..0d21959ac
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollUp.st
@@ -0,0 +1,4 @@
+event handling
+scrollUp
+
+ self showChatMessagesFrom: self lowestVisibleMessage + 1.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/showChatMessagesFrom..st b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/showChatMessagesFrom..st
new file mode 100644
index 000000000..24f54cae2
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/showChatMessagesFrom..st
@@ -0,0 +1,12 @@
+accessing
+showChatMessagesFrom: lowestMessage
+
+ self clearMessages.
+ self lowestVisibleMessage: lowestMessage.
+
+ self chat messages reversed collect: [:message | self addMessageAtBottom: message]
+ from: 1
+ to: self chat numberOfMessages - lowestMessage.
+
+ self chat numberOfMessages < (lowestMessage + 20) ifTrue: [
+ self core getChatHistoryFrom: self chat id].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUChatMessageList.class/methodProperties.json
new file mode 100644
index 000000000..b08095731
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/methodProperties.json
@@ -0,0 +1,21 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "addMessageAtBottom:" : "js 8/2/2020 22:03",
+ "addMessages" : "js 8/2/2020 22:16",
+ "chat" : "js 7/31/2020 16:39",
+ "chat:" : "js 7/31/2020 16:39",
+ "clearMessages" : "js 7/31/2020 16:46",
+ "core" : "js 8/2/2020 22:11",
+ "defaultMessageMargin" : "js 7/31/2020 15:50",
+ "displayChat:" : "f.w. 8/1/2020 04:53",
+ "handleMouseWheel:" : "f.w. 7/31/2020 23:53",
+ "initialize" : "js 7/31/2020 17:19",
+ "lowestVisibleMessage" : "f.w. 7/31/2020 23:55",
+ "lowestVisibleMessage:" : "f.w. 7/31/2020 23:55",
+ "messages" : "rs 6/17/2020 19:10",
+ "messages:" : "rs 6/17/2020 19:10",
+ "scrollDown" : "js 8/2/2020 22:17",
+ "scrollUp" : "js 8/2/2020 22:17",
+ "showChatMessagesFrom:" : "js 8/2/2020 22:18" } }
diff --git a/packages/TelegramClient-UI.package/TCUChatMessageList.class/properties.json b/packages/TelegramClient-UI.package/TCUChatMessageList.class/properties.json
new file mode 100644
index 000000000..03d005133
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatMessageList.class/properties.json
@@ -0,0 +1,16 @@
+{
+ "category" : "TelegramClient-UI",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "rs 6/17/2020 21:32",
+ "instvars" : [
+ "messages",
+ "chat",
+ "lowestVisibleMessage" ],
+ "name" : "TCUChatMessageList",
+ "pools" : [
+ ],
+ "super" : "Morph",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/README.md b/packages/TelegramClient-UI.package/TCUChatWindow.class/README.md
new file mode 100644
index 000000000..103b9fe74
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/README.md
@@ -0,0 +1 @@
+a view to display a single chat
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/class/newWithHeight.width..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/class/newWithHeight.width..st
new file mode 100644
index 000000000..40e5874fd
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/class/newWithHeight.width..st
@@ -0,0 +1,10 @@
+instance creation
+newWithHeight: aHeight width: aWidth
+
+ ^ self basicNew
+ initialize;
+ height: aHeight;
+ width: aWidth;
+ addWelcomeMessage;
+ addInputBar;
+ addMessageWindow
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addChatName.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addChatName.st
new file mode 100644
index 000000000..e24bf56ea
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addChatName.st
@@ -0,0 +1,6 @@
+drawing
+addChatName
+
+ self titleBar addMorph: (TextMorph new
+ contents: self selectedChat title asText;
+ lock).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addInputBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addInputBar.st
new file mode 100644
index 000000000..6fdf16409
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addInputBar.st
@@ -0,0 +1,8 @@
+drawing
+addInputBar
+
+ self
+ createInputBar;
+ addMorph: self inputBar;
+ addSendButton;
+ addTextInputField.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addMessageWindow.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addMessageWindow.st
new file mode 100644
index 000000000..73daa4ae9
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addMessageWindow.st
@@ -0,0 +1,12 @@
+drawing
+addMessageWindow
+
+ self
+ messageListWindow: (TCUChatMessageList new
+ height: self height - self defaultInputfieldHeight;
+ width: self width;
+ color: Color white;
+ lowestVisibleMessage: 0;
+ topLeft: self topLeft;
+ hide);
+ addMorph: self messageListWindow.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addSendButton.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addSendButton.st
new file mode 100644
index 000000000..fe832d5f3
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addSendButton.st
@@ -0,0 +1,6 @@
+drawing
+addSendButton
+
+ self inputBar addMorph: (TCUButton new
+ text: 'Send';
+ on: #mouseDown send: #buttonSendPressed to: self).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st
new file mode 100644
index 000000000..5feccb258
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st
@@ -0,0 +1,11 @@
+drawing
+addTextInputField
+
+ self textInputField: (TextMorph new
+ borderWidth: 2;
+ borderColor: TCUDefaultValues colorLightBlue;
+ contentsWrapped: '' asText;
+ extent: ((self inputBar width - 200) @ self defaultInputfieldHeight);
+ crAction: [self buttonSendPressed]).
+
+ self inputBar addMorph: self textInputField.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTitleBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTitleBar.st
new file mode 100644
index 000000000..abe157023
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTitleBar.st
@@ -0,0 +1,7 @@
+drawing
+addTitleBar
+
+ self
+ createTitleBar;
+ addMorph: self titleBar;
+ addChatName.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addWelcomeMessage.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addWelcomeMessage.st
new file mode 100644
index 000000000..7a61e41f2
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addWelcomeMessage.st
@@ -0,0 +1,8 @@
+drawing
+addWelcomeMessage
+
+ self
+ welcomeMessage: (TextMorph new
+ contents: 'Welcome!' asText;
+ lock);
+ addMorphCentered: self welcomeMessage.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/buttonSendPressed.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/buttonSendPressed.st
new file mode 100644
index 000000000..218cd789b
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/buttonSendPressed.st
@@ -0,0 +1,8 @@
+event handling
+buttonSendPressed
+
+ self triggerEvent: #buttonSendPressed with: (Dictionary newFrom: {
+ 'chatId' -> self selectedChat id.
+ 'message' -> self textInputField contents}).
+
+ self textInputField contents: ''.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/clear.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/clear.st
new file mode 100644
index 000000000..155865580
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/clear.st
@@ -0,0 +1,7 @@
+drawing
+clear
+
+ self titleBar delete.
+ self inputBar hide.
+ self welcomeMessage show.
+ self messageListWindow hide.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/core.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/core.st
new file mode 100644
index 000000000..c5c47a7b4
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/core.st
@@ -0,0 +1,4 @@
+accessing
+core
+
+ ^ self owner core
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st
new file mode 100644
index 000000000..1f10283fe
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st
@@ -0,0 +1,15 @@
+drawing
+createInputBar
+
+ self inputBar: (RectangleMorph new
+ borderWidth: 0;
+ color: TCUDefaultValues colorLightGray;
+ width: self width;
+ height: self defaultInputfieldHeight;
+ bottomLeft: (self bottomLeft);
+ layoutPolicy: TableLayout new;
+ listDirection: #leftToRight;
+ layoutInset: 2;
+ vResizing: #shrinkWrap;
+ cellInset: 12;
+ hide).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createTitleBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createTitleBar.st
new file mode 100644
index 000000000..52b746997
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createTitleBar.st
@@ -0,0 +1,14 @@
+drawing
+createTitleBar
+
+ self titleBar: (RectangleMorph new
+ borderWidth: 0;
+ color: TCUDefaultValues colorLightGray;
+ width: self width;
+ height: self defaultTitleBarHeigth;
+ topLeft: (self topLeft);
+ layoutPolicy: TableLayout new;
+ listDirection: #leftToRight;
+ layoutInset: 2;
+ vResizing: #shrinkWrap;
+ cellInset: 12).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/defaultInputfieldHeight.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/defaultInputfieldHeight.st
new file mode 100644
index 000000000..86a15c03c
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/defaultInputfieldHeight.st
@@ -0,0 +1,4 @@
+default values
+defaultInputfieldHeight
+
+ ^ 70
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/defaultTitleBarHeigth.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/defaultTitleBarHeigth.st
new file mode 100644
index 000000000..92517540c
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/defaultTitleBarHeigth.st
@@ -0,0 +1,4 @@
+default values
+defaultTitleBarHeigth
+
+ ^ 50
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatWindow.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/initialize.st
similarity index 55%
rename from TelegramClient-UI.package/TCUChatWindow.class/instance/initialize.st
rename to packages/TelegramClient-UI.package/TCUChatWindow.class/instance/initialize.st
index b7a165527..2151043e7 100644
--- a/TelegramClient-UI.package/TCUChatWindow.class/instance/initialize.st
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/initialize.st
@@ -2,7 +2,9 @@ initialization
initialize
super initialize.
-
+
self
color: TCUDefaultValues colorLightGray;
- borderWidth: 0.
\ No newline at end of file
+ borderWidth: 0;
+ selectedChat: TCCNullChat new;
+ titleBar: Morph new.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/inputBar..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/inputBar..st
new file mode 100644
index 000000000..408f81a82
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/inputBar..st
@@ -0,0 +1,4 @@
+accessing
+inputBar: aMorph
+
+ inputBar := aMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/inputBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/inputBar.st
new file mode 100644
index 000000000..1777c439d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/inputBar.st
@@ -0,0 +1,4 @@
+accessing
+inputBar
+
+ ^ inputBar
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/messageListWindow..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/messageListWindow..st
new file mode 100644
index 000000000..1398cd517
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/messageListWindow..st
@@ -0,0 +1,4 @@
+accessing
+messageListWindow: aChatMessageList
+
+ messageListWindow := aChatMessageList.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/messageListWindow.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/messageListWindow.st
new file mode 100644
index 000000000..493a9a455
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/messageListWindow.st
@@ -0,0 +1,4 @@
+accessing
+messageListWindow
+
+ ^ messageListWindow
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st
new file mode 100644
index 000000000..fc9260d70
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st
@@ -0,0 +1,12 @@
+event handling
+newChatSelected: aChat
+
+ self welcomeMessage hide.
+ self inputBar show.
+ self titleBar delete.
+ self
+ selectedChat: aChat;
+ addTitleBar.
+
+ self messageListWindow show.
+ self messageListWindow displayChat: aChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/selectedChat..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/selectedChat..st
new file mode 100644
index 000000000..0cf5e25e1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/selectedChat..st
@@ -0,0 +1,4 @@
+accessing
+selectedChat: aChat
+
+ selectedChat := aChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/selectedChat.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/selectedChat.st
new file mode 100644
index 000000000..83fe8d278
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/selectedChat.st
@@ -0,0 +1,4 @@
+accessing
+selectedChat
+
+ ^ selectedChat
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/textInputField..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/textInputField..st
new file mode 100644
index 000000000..ddeee619d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/textInputField..st
@@ -0,0 +1,4 @@
+accessing
+textInputField: aTextMorph
+
+ textInputField := aTextMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/textInputField.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/textInputField.st
new file mode 100644
index 000000000..cc604305d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/textInputField.st
@@ -0,0 +1,4 @@
+accessing
+textInputField
+
+ ^ textInputField
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/titleBar..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/titleBar..st
new file mode 100644
index 000000000..b9062d355
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/titleBar..st
@@ -0,0 +1,4 @@
+accessing
+titleBar: aMorph
+
+ titleBar := aMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/titleBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/titleBar.st
new file mode 100644
index 000000000..f086ab6ca
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/titleBar.st
@@ -0,0 +1,4 @@
+accessing
+titleBar
+
+ ^ titleBar
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/welcomeMessage..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/welcomeMessage..st
new file mode 100644
index 000000000..30fc4275b
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/welcomeMessage..st
@@ -0,0 +1,4 @@
+accessing
+welcomeMessage: aMorph
+
+ welcomeMessage := aMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/welcomeMessage.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/welcomeMessage.st
new file mode 100644
index 000000000..37403ded1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/welcomeMessage.st
@@ -0,0 +1,4 @@
+accessing
+welcomeMessage
+
+ ^ welcomeMessage
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json
new file mode 100644
index 000000000..2520a9b08
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json
@@ -0,0 +1,32 @@
+{
+ "class" : {
+ "newWithHeight:width:" : "rs 6/17/2020 20:22" },
+ "instance" : {
+ "addChatName" : "sp 8/2/2020 16:03",
+ "addInputBar" : "js 6/13/2020 17:59",
+ "addMessageWindow" : "f.w. 8/1/2020 02:37",
+ "addSendButton" : "js 6/13/2020 18:46",
+ "addTextInputField" : "js 8/2/2020 23:19",
+ "addTitleBar" : "sp 8/2/2020 15:57",
+ "addWelcomeMessage" : "N.S. 7/26/2020 15:57",
+ "buttonSendPressed" : "js 8/2/2020 23:19",
+ "clear" : "sp 8/2/2020 15:33",
+ "core" : "js 8/2/2020 22:11",
+ "createInputBar" : "rs 6/17/2020 21:01",
+ "createTitleBar" : "sp 8/2/2020 15:52",
+ "defaultInputfieldHeight" : "rs 6/12/2020 20:03",
+ "defaultTitleBarHeigth" : "sp 8/2/2020 15:15",
+ "initialize" : "js 8/2/2020 17:47",
+ "inputBar" : "rs 6/13/2020 10:38",
+ "inputBar:" : "rs 6/13/2020 10:38",
+ "messageListWindow" : "rs 6/17/2020 19:12",
+ "messageListWindow:" : "rs 6/17/2020 19:13",
+ "newChatSelected:" : "js 8/2/2020 22:30",
+ "selectedChat" : "rs 6/13/2020 09:11",
+ "selectedChat:" : "rs 6/13/2020 09:11",
+ "textInputField" : "rs 6/13/2020 10:41",
+ "textInputField:" : "rs 6/13/2020 10:42",
+ "titleBar" : "sp 8/2/2020 15:04",
+ "titleBar:" : "sp 8/2/2020 15:04",
+ "welcomeMessage" : "rs 6/13/2020 09:36",
+ "welcomeMessage:" : "rs 6/13/2020 09:36" } }
diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json b/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json
new file mode 100644
index 000000000..3db975436
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json
@@ -0,0 +1,20 @@
+{
+ "category" : "TelegramClient-UI",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 6/13/2020 19:01",
+ "instvars" : [
+ "titleBar",
+ "inputBar",
+ "selectedChat",
+ "welcomeMessage",
+ "textInputField",
+ "messageListWindow",
+ "lowestVisibleMessage" ],
+ "name" : "TCUChatWindow",
+ "pools" : [
+ ],
+ "super" : "RectangleMorph",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/README.md b/packages/TelegramClient-UI.package/TCUChatsList.class/README.md
new file mode 100644
index 000000000..1a445a2cd
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/README.md
@@ -0,0 +1 @@
+a view in TCUMain to display a list of all chats
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chatItemClicked.event.from..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chatItemClicked.event.from..st
new file mode 100644
index 000000000..a94192d8a
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chatItemClicked.event.from..st
@@ -0,0 +1,13 @@
+event handling
+chatItemClicked: aChatListItem event: anEvent from: aSender
+
+ self deselectChats.
+
+ (aChatListItem chatID ~= self selectedChat id)
+ ifTrue: [aChatListItem select.
+ self
+ selectedChat: aChatListItem chat;
+ triggerEvent: #newChatSelected with: aChatListItem chat]
+ ifFalse: [self
+ selectedChat: TCCNullChat new;
+ triggerEvent: #chatDeselected].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chats..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chats..st
new file mode 100644
index 000000000..2610f6ab3
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chats..st
@@ -0,0 +1,7 @@
+accessing
+chats: aCollection
+
+ chats := aCollection.
+ self redrawItems.
+ chats when: #chatsListChanged send: #redrawItems to: self.
+ chats when: #openNewChat send: #openNewChat: to: self.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chats.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chats.st
new file mode 100644
index 000000000..2ce278459
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/chats.st
@@ -0,0 +1,4 @@
+accessing
+chats
+
+ ^ chats
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/clearItems.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/clearItems.st
new file mode 100644
index 000000000..24b33c724
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/clearItems.st
@@ -0,0 +1,5 @@
+drawing
+clearItems
+
+ self items do: [:anItem | anItem delete].
+ self items removeAll.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/createChatListItem..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/createChatListItem..st
new file mode 100644
index 000000000..3acc0fbac
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/createChatListItem..st
@@ -0,0 +1,10 @@
+drawing
+createChatListItem: aChat
+
+ | item |
+
+ item := TCUChatListItem newWithChat: aChat width: self width.
+ (aChat = self selectedChat) ifTrue: [item select].
+ item on: #mouseDown send: #chatItemClicked:event:from: to: self withValue: item.
+
+ ^ item
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/defaultScrollStep.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/defaultScrollStep.st
new file mode 100644
index 000000000..d6258a2c4
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/defaultScrollStep.st
@@ -0,0 +1,4 @@
+default values
+defaultScrollStep
+
+ ^ 50
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/defaultWidth.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/defaultWidth.st
similarity index 57%
rename from TelegramClient-UI.package/TCUChatsList.class/instance/defaultWidth.st
rename to packages/TelegramClient-UI.package/TCUChatsList.class/instance/defaultWidth.st
index 86944163a..6050c591e 100644
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/defaultWidth.st
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/defaultWidth.st
@@ -1,4 +1,4 @@
-defaultValues
+default values
defaultWidth
^ 300
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/deselectChats.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/deselectChats.st
new file mode 100644
index 000000000..2c72a0189
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/deselectChats.st
@@ -0,0 +1,4 @@
+drawing
+deselectChats
+
+ self items do: [:each | each deselect].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/handleMouseWheel..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/handleMouseWheel..st
new file mode 100644
index 000000000..94ba585a4
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/handleMouseWheel..st
@@ -0,0 +1,7 @@
+event handling
+handleMouseWheel: anEvent
+
+ self maxHeight: (self owner position y).
+
+ anEvent isWheelUp ifTrue: [self scrollUp].
+ anEvent isWheelDown ifTrue: [self scrollDown].
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/initialize.st
similarity index 68%
rename from TelegramClient-UI.package/TCUChatsList.class/instance/initialize.st
rename to packages/TelegramClient-UI.package/TCUChatsList.class/instance/initialize.st
index e3024ef6c..de6505293 100644
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/initialize.st
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/initialize.st
@@ -2,10 +2,11 @@ initialization
initialize
super initialize.
-
+
self
width: self defaultWidth;
color: Color white;
borderWidth: 0;
initializeLayout;
- items: OrderedCollection new.
\ No newline at end of file
+ items: OrderedCollection new;
+ selectedChat: TCCNullChat new.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/initializeLayout.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/initializeLayout.st
similarity index 93%
rename from TelegramClient-UI.package/TCUChatsList.class/instance/initializeLayout.st
rename to packages/TelegramClient-UI.package/TCUChatsList.class/instance/initializeLayout.st
index c61ee1b0c..ea0678749 100644
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/initializeLayout.st
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/initializeLayout.st
@@ -1,6 +1,6 @@
initialization
initializeLayout
- self
+ self
layoutPolicy: TableLayout new;
listDirection: #topToBottom.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/items..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/items..st
new file mode 100644
index 000000000..e8bf8fcf7
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/items..st
@@ -0,0 +1,4 @@
+accessing
+items: aCollection
+
+ items := aCollection.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUChatsList.class/instance/items.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/items.st
similarity index 96%
rename from TelegramClient-UI.package/TCUChatsList.class/instance/items.st
rename to packages/TelegramClient-UI.package/TCUChatsList.class/instance/items.st
index 5d5ba6737..7322123ab 100644
--- a/TelegramClient-UI.package/TCUChatsList.class/instance/items.st
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/items.st
@@ -1,3 +1,4 @@
accessing
items
+
^ items
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/maxHeight..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/maxHeight..st
new file mode 100644
index 000000000..b3eea518d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/maxHeight..st
@@ -0,0 +1,4 @@
+accessing
+maxHeight: aNumber
+
+ maxHeight := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/maxHeight.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/maxHeight.st
new file mode 100644
index 000000000..b8333ad34
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/maxHeight.st
@@ -0,0 +1,4 @@
+accessing
+maxHeight
+
+ ^maxHeight
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/openNewChat..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/openNewChat..st
new file mode 100644
index 000000000..dbb364da3
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/openNewChat..st
@@ -0,0 +1,4 @@
+events
+openNewChat: aChat
+
+ self triggerEvent: #openNewChat with: aChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/redrawItems.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/redrawItems.st
new file mode 100644
index 000000000..f394e8545
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/redrawItems.st
@@ -0,0 +1,9 @@
+drawing
+redrawItems
+
+ self clearItems.
+
+ self items: (self chats collect: [:aChat |
+ self createChatListItem: aChat]).
+
+ self items do: [:anItem | self addMorph: anItem].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/scrollDown.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/scrollDown.st
new file mode 100644
index 000000000..6163af055
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/scrollDown.st
@@ -0,0 +1,4 @@
+event handling
+scrollDown
+
+ self position: self position - (0 @ self defaultScrollStep).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/scrollUp.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/scrollUp.st
new file mode 100644
index 000000000..975366d3d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/scrollUp.st
@@ -0,0 +1,5 @@
+event handling
+scrollUp
+
+ self position y >= self maxHeight ifFalse:[
+ self position: self position + (0 @ self defaultScrollStep).].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/selectedChat..st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/selectedChat..st
new file mode 100644
index 000000000..2f964003b
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/selectedChat..st
@@ -0,0 +1,4 @@
+accessing
+selectedChat: anID
+
+ selectedChat := anID.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/instance/selectedChat.st b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/selectedChat.st
new file mode 100644
index 000000000..83fe8d278
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/instance/selectedChat.st
@@ -0,0 +1,4 @@
+accessing
+selectedChat
+
+ ^ selectedChat
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUChatsList.class/methodProperties.json
new file mode 100644
index 000000000..b8877cc37
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/methodProperties.json
@@ -0,0 +1,25 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "chatItemClicked:event:from:" : "js 8/2/2020 22:29",
+ "chats" : "rs 6/17/2020 22:38",
+ "chats:" : "f.w. 7/15/2020 23:57",
+ "clearItems" : "rs 6/17/2020 22:39",
+ "createChatListItem:" : "js 7/31/2020 23:05",
+ "defaultScrollStep" : "r.s 8/2/2020 21:24",
+ "defaultWidth" : "R.S 6/1/2020 14:24",
+ "deselectChats" : "js 8/2/2020 22:29",
+ "handleMouseWheel:" : "r.s 7/15/2020 15:09",
+ "initialize" : "f.w. 7/12/2020 04:29",
+ "initializeLayout" : "js 6/13/2020 18:49",
+ "items" : "js 6/13/2020 14:14",
+ "items:" : "js 6/13/2020 19:09",
+ "maxHeight" : "f.w. 7/12/2020 00:10",
+ "maxHeight:" : "f.w. 7/12/2020 04:56",
+ "openNewChat:" : "f.w. 7/16/2020 00:02",
+ "redrawItems" : "js 8/2/2020 13:31",
+ "scrollDown" : "r.s 8/2/2020 21:24",
+ "scrollUp" : "r.s 8/2/2020 21:24",
+ "selectedChat" : "rs 6/13/2020 08:51",
+ "selectedChat:" : "rs 6/17/2020 22:25" } }
diff --git a/packages/TelegramClient-UI.package/TCUChatsList.class/properties.json b/packages/TelegramClient-UI.package/TCUChatsList.class/properties.json
new file mode 100644
index 000000000..eb76ad4da
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUChatsList.class/properties.json
@@ -0,0 +1,17 @@
+{
+ "category" : "TelegramClient-UI",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "js 6/13/2020 19:01",
+ "instvars" : [
+ "items",
+ "selectedChat",
+ "chats",
+ "maxHeight" ],
+ "name" : "TCUChatsList",
+ "pools" : [
+ ],
+ "super" : "RectangleMorph",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCUDefaultValues.class/README.md b/packages/TelegramClient-UI.package/TCUDefaultValues.class/README.md
new file mode 100644
index 000000000..1eb8d1d0f
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUDefaultValues.class/README.md
@@ -0,0 +1 @@
+serves some standard telegram colors
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorCarrot.st b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorCarrot.st
new file mode 100644
index 000000000..e7e0e5967
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorCarrot.st
@@ -0,0 +1,4 @@
+colors
+colorCarrot
+
+ ^ (Color r: (230 /255) g: (126 / 255) b: (22 / 255))
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUDefaultValues.class/class/colorGray.st b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorGray.st
similarity index 100%
rename from TelegramClient-UI.package/TCUDefaultValues.class/class/colorGray.st
rename to packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorGray.st
diff --git a/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightBlue.st b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightBlue.st
new file mode 100644
index 000000000..cabfc3326
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightBlue.st
@@ -0,0 +1,4 @@
+colors
+colorLightBlue
+
+ ^ (Color r: (0 /255) g: (136 / 255) b: (204 / 255))
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightGray.st b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightGray.st
similarity index 100%
rename from TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightGray.st
rename to packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorLightGray.st
diff --git a/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorRed.st b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorRed.st
new file mode 100644
index 000000000..a6b91258d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUDefaultValues.class/class/colorRed.st
@@ -0,0 +1,4 @@
+colors
+colorRed
+
+ ^ (Color r: (167 /255) g: (1 / 255) b: (0 / 255))
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUDefaultValues.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUDefaultValues.class/methodProperties.json
new file mode 100644
index 000000000..73b68246a
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUDefaultValues.class/methodProperties.json
@@ -0,0 +1,9 @@
+{
+ "class" : {
+ "colorCarrot" : "N.S. 7/26/2020 22:36",
+ "colorGray" : "R.S 5/20/2020 13:41",
+ "colorLightBlue" : "N.S. 7/26/2020 15:48",
+ "colorLightGray" : "R.S 6/1/2020 14:25",
+ "colorRed" : "LL 7/15/2020 19:36" },
+ "instance" : {
+ } }
diff --git a/TelegramClient-UI.package/TCUDefaultValues.class/properties.json b/packages/TelegramClient-UI.package/TCUDefaultValues.class/properties.json
similarity index 83%
rename from TelegramClient-UI.package/TCUDefaultValues.class/properties.json
rename to packages/TelegramClient-UI.package/TCUDefaultValues.class/properties.json
index 7f224d421..47c4cb10c 100644
--- a/TelegramClient-UI.package/TCUDefaultValues.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUDefaultValues.class/properties.json
@@ -4,7 +4,7 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 19:01",
"instvars" : [
],
"name" : "TCUDefaultValues",
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/README.md b/packages/TelegramClient-UI.package/TCUHeaderBar.class/README.md
new file mode 100644
index 000000000..fb01ef147
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/README.md
@@ -0,0 +1 @@
+a simple Headerbar for the main view with some buttons
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/class/newForMain..st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/class/newForMain..st
new file mode 100644
index 000000000..51c0be644
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/class/newForMain..st
@@ -0,0 +1,6 @@
+instance creation
+newForMain: aMainWindow
+
+ ^ self basicNew
+ main: aMainWindow;
+ initialize
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addCloseButton.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addCloseButton.st
new file mode 100644
index 000000000..e0be51f86
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addCloseButton.st
@@ -0,0 +1,13 @@
+initialization
+addCloseButton
+
+ | closeButton |
+
+ closeButton := TCUButton new
+ text: 'close';
+ color: TCUDefaultValues colorRed;
+ on: #mouseUp send: #delete to: self main.
+ closeButton text color: Color white.
+ closeButton position: (self main position x + self defaultSpacing) @ self defaultSpacing.
+
+ self addMorph: closeButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addLogoutButton.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addLogoutButton.st
new file mode 100644
index 000000000..5faf022cc
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addLogoutButton.st
@@ -0,0 +1,11 @@
+initialization
+addLogoutButton
+
+ | logoutButton |
+
+ logoutButton := TCUButton new
+ text: 'logout';
+ on: #mouseUp send: #logout to: self main.
+ logoutButton position: (self main position x + self main width - logoutButton width - self defaultSpacing) @ self defaultSpacing.
+
+ self addMorph: logoutButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addNewChatButton.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addNewChatButton.st
new file mode 100644
index 000000000..20443eacf
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addNewChatButton.st
@@ -0,0 +1,13 @@
+initialization
+addNewChatButton
+
+ | newChatButton |
+
+ newChatButton := (TCUButton new
+ text: '+ Chat';
+ on: #mouseUp send: #newChatButtonClicked to: self).
+
+ newChatButton text color: Color white.
+ newChatButton position: (self main position x + newChatButton width + (4 * self defaultSpacing)) @ self defaultSpacing.
+
+ self addMorph: newChatButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addTitle..st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addTitle..st
new file mode 100644
index 000000000..aeafa0a5d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/addTitle..st
@@ -0,0 +1,11 @@
+initialization
+addTitle: aString
+
+ | font |
+
+ font := (TextFontReference toFont: (StrikeFont familyName: 'DefaultTextStyle' size: 35)).
+
+ self addMorphCentered: (TextMorph new
+ contents: (aString asText addAttribute: font);
+ color: Color white;
+ lock).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/defaultHeight.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/defaultHeight.st
new file mode 100644
index 000000000..efe6e3f24
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/defaultHeight.st
@@ -0,0 +1,4 @@
+default values
+defaultHeight
+
+ ^ 40
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/defaultSpacing.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/defaultSpacing.st
new file mode 100644
index 000000000..2f55932b1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/defaultSpacing.st
@@ -0,0 +1,4 @@
+default values
+defaultSpacing
+
+ ^ 5
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/initialize.st
new file mode 100644
index 000000000..6922213b4
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/initialize.st
@@ -0,0 +1,15 @@
+initialization
+initialize
+
+ super initialize.
+
+ self
+ borderWidth: 0;
+ color: TCUDefaultValues colorGray;
+ extent: self main width @ self defaultHeight.
+
+ self
+ addTitle: 'Telegram';
+ addLogoutButton;
+ addCloseButton;
+ addNewChatButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/main..st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/main..st
new file mode 100644
index 000000000..f8bbbce83
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/main..st
@@ -0,0 +1,4 @@
+accessing
+main: aMainWindow
+
+ main := aMainWindow.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/main.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/main.st
new file mode 100644
index 000000000..f1beff8a1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/main.st
@@ -0,0 +1,4 @@
+accessing
+main
+
+ ^ main
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/newChatButtonClicked.st b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/newChatButtonClicked.st
new file mode 100644
index 000000000..3c18a4e13
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/instance/newChatButtonClicked.st
@@ -0,0 +1,18 @@
+accessing
+newChatButtonClicked
+
+ | inputField modal |
+ modal := (TCUModal newWithText: 'Create new Chat with TelegramTag: ' type: 'information').
+ inputField := TextMorph new
+ contentsWrapped: '@';
+ backgroundColor: Color white;
+ borderWidth: 2;
+ extent: 200 @ 50;
+ borderColor: TCUDefaultValues colorLightBlue.
+ inputField crAction: [
+ self main core searchChat: inputField text.
+ modal delete].
+
+ modal
+ addMorphCentered: inputField.
+ self main addMorphCentered: modal.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUHeaderBar.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUHeaderBar.class/methodProperties.json
new file mode 100644
index 000000000..0c961a48e
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/methodProperties.json
@@ -0,0 +1,14 @@
+{
+ "class" : {
+ "newForMain:" : "js 8/2/2020 22:34" },
+ "instance" : {
+ "addCloseButton" : "r.s 8/2/2020 19:02",
+ "addLogoutButton" : "r.s 8/2/2020 19:03",
+ "addNewChatButton" : "js 8/2/2020 22:21",
+ "addTitle:" : "r.s 8/2/2020 18:52",
+ "defaultHeight" : "r.s 8/2/2020 18:59",
+ "defaultSpacing" : "r.s 8/2/2020 18:54",
+ "initialize" : "r.s 8/2/2020 19:02",
+ "main" : "r.s 8/2/2020 19:02",
+ "main:" : "r.s 8/2/2020 19:02",
+ "newChatButtonClicked" : "js 8/2/2020 22:22" } }
diff --git a/TelegramClient-UI.package/TCUChatsList.class/properties.json b/packages/TelegramClient-UI.package/TCUHeaderBar.class/properties.json
similarity index 69%
rename from TelegramClient-UI.package/TCUChatsList.class/properties.json
rename to packages/TelegramClient-UI.package/TCUHeaderBar.class/properties.json
index 400095e6f..c86b345ce 100644
--- a/TelegramClient-UI.package/TCUChatsList.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUHeaderBar.class/properties.json
@@ -4,10 +4,10 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 8/2/2020 22:35",
"instvars" : [
- "items" ],
- "name" : "TCUChatsList",
+ "main" ],
+ "name" : "TCUHeaderBar",
"pools" : [
],
"super" : "RectangleMorph",
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/README.md b/packages/TelegramClient-UI.package/TCUMain.class/README.md
new file mode 100644
index 000000000..03a913036
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/README.md
@@ -0,0 +1 @@
+the main view containing message history in a chat and a list of all open chats
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/class/newWithCore..st b/packages/TelegramClient-UI.package/TCUMain.class/class/newWithCore..st
similarity index 80%
rename from TelegramClient-UI.package/TCUMain.class/class/newWithCore..st
rename to packages/TelegramClient-UI.package/TCUMain.class/class/newWithCore..st
index 4315d5317..23df20701 100644
--- a/TelegramClient-UI.package/TCUMain.class/class/newWithCore..st
+++ b/packages/TelegramClient-UI.package/TCUMain.class/class/newWithCore..st
@@ -1,4 +1,4 @@
-creation
+instance creation
newWithCore: aCore
^ self basicNew
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/addChatsList.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/addChatsList.st
new file mode 100644
index 000000000..161d43c51
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/addChatsList.st
@@ -0,0 +1,10 @@
+drawing
+addChatsList
+
+ self chatsList: (TCUChatsList new
+ height: (self height - self header height);
+ position: (self position + (0 @ self header height));
+ chats: self core chats).
+
+ self
+ addMorphBack: self chatsList.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/addHeader.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/addHeader.st
new file mode 100644
index 000000000..01dab6682
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/addHeader.st
@@ -0,0 +1,6 @@
+drawing
+addHeader
+
+ self
+ header: (TCUHeaderBar newForMain: self);
+ addMorph: self header.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/chatWindow..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/chatWindow..st
similarity index 100%
rename from TelegramClient-UI.package/TCUMain.class/instance/chatWindow..st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/chatWindow..st
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/chatWindow.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/chatWindow.st
similarity index 100%
rename from TelegramClient-UI.package/TCUMain.class/instance/chatWindow.st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/chatWindow.st
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/chatsList..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/chatsList..st
similarity index 100%
rename from TelegramClient-UI.package/TCUMain.class/instance/chatsList..st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/chatsList..st
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/chatsList.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/chatsList.st
similarity index 100%
rename from TelegramClient-UI.package/TCUMain.class/instance/chatsList.st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/chatsList.st
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/core..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/core..st
new file mode 100644
index 000000000..e78ac3350
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/core..st
@@ -0,0 +1,5 @@
+accessing
+core: aCore
+
+ core := aCore.
+ aCore when: #newMessageReceived send: #newMessageReceived: to: self.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/core.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/core.st
new file mode 100644
index 000000000..7652dd8d1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/core.st
@@ -0,0 +1,4 @@
+accessing
+core
+
+ ^ core
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/defaultExtent.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/defaultExtent.st
similarity index 65%
rename from TelegramClient-UI.package/TCUMain.class/instance/defaultExtent.st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/defaultExtent.st
index 4a0345036..0b52ad8e8 100644
--- a/TelegramClient-UI.package/TCUMain.class/instance/defaultExtent.st
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/defaultExtent.st
@@ -1,4 +1,4 @@
-defaultValues
+default values
defaultExtent
^ 1200 @ 800
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/defaultSpacing.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/defaultSpacing.st
new file mode 100644
index 000000000..2f55932b1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/defaultSpacing.st
@@ -0,0 +1,4 @@
+default values
+defaultSpacing
+
+ ^ 5
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/delete.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/delete.st
similarity index 68%
rename from TelegramClient-UI.package/TCUMain.class/instance/delete.st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/delete.st
index 8fbfe089e..d931c9f03 100644
--- a/TelegramClient-UI.package/TCUMain.class/instance/delete.st
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/delete.st
@@ -1,4 +1,4 @@
-deletion
+submorphs-add/remove
delete
self core client free.
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/getChatHistoryFrom..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/getChatHistoryFrom..st
new file mode 100644
index 000000000..4d031c910
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/getChatHistoryFrom..st
@@ -0,0 +1,4 @@
+core communication
+getChatHistoryFrom: aChat
+
+ self core getChatHistoryFrom: aChat id.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/header..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/header..st
new file mode 100644
index 000000000..7b253caaf
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/header..st
@@ -0,0 +1,4 @@
+accessing
+header: anHeader
+
+ header := anHeader.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/header.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/header.st
new file mode 100644
index 000000000..51873713f
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/header.st
@@ -0,0 +1,4 @@
+accessing
+header
+
+ ^ header
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/initialize.st
similarity index 53%
rename from TelegramClient-UI.package/TCUMain.class/instance/initialize.st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/initialize.st
index 924c25d78..a846ca233 100644
--- a/TelegramClient-UI.package/TCUMain.class/instance/initialize.st
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/initialize.st
@@ -2,13 +2,12 @@ initialization
initialize
super initialize.
- self
+ self
extent: self defaultExtent;
borderWidth: 0;
addHeader;
+ chatWindow: TCUChatWindow new;
addChatsList;
- addChatWindow;
- subscribeCore;
- clipSubmorphs: true.
-
- self core getChats.
\ No newline at end of file
+ initializeChatWindow;
+ subscribeChatsList;
+ clipSubmorphs: true.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/initializeChatWindow.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/initializeChatWindow.st
new file mode 100644
index 000000000..f6630886e
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/initializeChatWindow.st
@@ -0,0 +1,11 @@
+initialization
+initializeChatWindow
+
+ self chatWindow: (TCUChatWindow
+ newWithHeight: (self height - self header height)
+ width: (self width - self chatsList width)).
+
+ self chatWindow
+ position: (self position + (self chatsList width @ self header height));
+ when: #buttonSendPressed send: #sendMessage: to: self.
+ self addMorph: self chatWindow.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUMain.class/instance/logout.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/logout.st
similarity index 72%
rename from TelegramClient-UI.package/TCUMain.class/instance/logout.st
rename to packages/TelegramClient-UI.package/TCUMain.class/instance/logout.st
index af3c82020..3d4c05fa9 100644
--- a/TelegramClient-UI.package/TCUMain.class/instance/logout.st
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/logout.st
@@ -1,5 +1,5 @@
-defaultValues
+core communication
logout
-
+
self core authHandler logout.
super delete.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/newChatSelected..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/newChatSelected..st
new file mode 100644
index 000000000..a047cce41
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/newChatSelected..st
@@ -0,0 +1,7 @@
+event handling
+newChatSelected: aChat
+
+ self chatsList
+ deselectChats;
+ selectedChat: TCCNullChat new.
+ self chatWindow newChatSelected: aChat.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/newMessageReceived..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/newMessageReceived..st
new file mode 100644
index 000000000..0aa45a84d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/newMessageReceived..st
@@ -0,0 +1,5 @@
+event handling
+newMessageReceived: aMessage
+
+ aMessage isOutgoing ifFalse: [
+ [TCUNotification newWithMessage: aMessage] fork].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/sendMessage..st b/packages/TelegramClient-UI.package/TCUMain.class/instance/sendMessage..st
new file mode 100644
index 000000000..51638bddb
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/sendMessage..st
@@ -0,0 +1,4 @@
+core communication
+sendMessage: aDictionary
+
+ self core sendMessage: (aDictionary at: 'message') to: (aDictionary at: 'chatId').
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/instance/subscribeChatsList.st b/packages/TelegramClient-UI.package/TCUMain.class/instance/subscribeChatsList.st
new file mode 100644
index 000000000..d73e08aeb
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/instance/subscribeChatsList.st
@@ -0,0 +1,8 @@
+core communication
+subscribeChatsList
+
+ self chatsList
+ when: #chatDeselected send: #clear to: self chatWindow;
+ when: #newChatSelected send: #newChatSelected: to: self chatWindow;
+ when: #newChatSelected send: #getChatHistoryFrom: to: self;
+ when: #openNewChat send: #newChatSelected: to: self.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMain.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUMain.class/methodProperties.json
new file mode 100644
index 000000000..be7fde321
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMain.class/methodProperties.json
@@ -0,0 +1,25 @@
+{
+ "class" : {
+ "newWithCore:" : "f.w. 6/3/2020 20:31" },
+ "instance" : {
+ "addChatsList" : "js 8/2/2020 22:05",
+ "addHeader" : "js 8/2/2020 22:05",
+ "chatWindow" : "R.S 6/1/2020 14:27",
+ "chatWindow:" : "R.S 6/1/2020 14:27",
+ "chatsList" : "R.S 6/1/2020 14:27",
+ "chatsList:" : "R.S 6/1/2020 14:27",
+ "core" : "js 6/13/2020 18:51",
+ "core:" : "r.s 8/2/2020 19:18",
+ "defaultExtent" : "R.S 6/1/2020 14:27",
+ "defaultSpacing" : "r.s 8/2/2020 18:44",
+ "delete" : "N.S. 7/31/2020 16:46",
+ "getChatHistoryFrom:" : "j 7/16/2020 12:05",
+ "header" : "r.s 8/2/2020 19:07",
+ "header:" : "r.s 8/2/2020 19:08",
+ "initialize" : "r.s 8/2/2020 19:09",
+ "initializeChatWindow" : "r.s 8/2/2020 19:09",
+ "logout" : "js 6/13/2020 18:11",
+ "newChatSelected:" : "js 8/2/2020 22:33",
+ "newMessageReceived:" : "js 8/2/2020 22:07",
+ "sendMessage:" : "rs 6/17/2020 21:19",
+ "subscribeChatsList" : "js 7/31/2020 23:09" } }
diff --git a/TelegramClient-UI.package/TCUMain.class/properties.json b/packages/TelegramClient-UI.package/TCUMain.class/properties.json
similarity index 74%
rename from TelegramClient-UI.package/TCUMain.class/properties.json
rename to packages/TelegramClient-UI.package/TCUMain.class/properties.json
index 385ce1fee..156df6670 100644
--- a/TelegramClient-UI.package/TCUMain.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUMain.class/properties.json
@@ -3,12 +3,13 @@
"classinstvars" : [
],
"classvars" : [
- ],
- "commentStamp" : "",
+ "Core" ],
+ "commentStamp" : "js 6/13/2020 19:02",
"instvars" : [
"chatWindow",
"chatsList",
- "core" ],
+ "core",
+ "header" ],
"name" : "TCUMain",
"pools" : [
],
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/README.md b/packages/TelegramClient-UI.package/TCUMessage.class/README.md
new file mode 100644
index 000000000..7229c3b22
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/README.md
@@ -0,0 +1 @@
+a single message displayed in a TCUMessageList
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/class/newFromTCCMessage..st b/packages/TelegramClient-UI.package/TCUMessage.class/class/newFromTCCMessage..st
new file mode 100644
index 000000000..62795e09f
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/class/newFromTCCMessage..st
@@ -0,0 +1,8 @@
+instance creation
+newFromTCCMessage: aMessage
+
+ ^ self basicNew
+ text: aMessage message;
+ senderID: aMessage senderID;
+ isOutgoing: aMessage isOutgoing;
+ initialize
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/addText.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/addText.st
new file mode 100644
index 000000000..6a86c8f7b
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/addText.st
@@ -0,0 +1,21 @@
+drawing
+addText
+
+ | textMorph expectedWidth |
+
+ textMorph := TextMorph new
+ contents: self text;
+ wrapFlag: true;
+ margins: self defaultTextMargins;
+ width: self defaultWidth;
+ hResizing: #rigid;
+ color: Color white;
+ lock.
+
+ expectedWidth := textMorph textStyle defaultFont widthOfString: self text.
+ (expectedWidth <= self defaultWidth)
+ ifTrue: [textMorph width: expectedWidth + (self defaultTextMargins x * 2)].
+
+ self
+ extent: textMorph extent + self defaultMargin;
+ addMorphCentered: textMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultHeight.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultHeight.st
new file mode 100644
index 000000000..75eced192
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultHeight.st
@@ -0,0 +1,4 @@
+default values
+defaultHeight
+
+ ^ 80
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultMargin.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultMargin.st
new file mode 100644
index 000000000..764f2eb69
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultMargin.st
@@ -0,0 +1,4 @@
+default values
+defaultMargin
+
+ ^ 0 @ 10
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultMinTextLength.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultMinTextLength.st
new file mode 100644
index 000000000..c95ff2818
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultMinTextLength.st
@@ -0,0 +1,4 @@
+default values
+defaultMinTextLength
+
+ ^ 80
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultTextMargins.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultTextMargins.st
new file mode 100644
index 000000000..f6afbb1c5
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultTextMargins.st
@@ -0,0 +1,4 @@
+default values
+defaultTextMargins
+
+ ^ 5 @ 5
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultWidth.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultWidth.st
new file mode 100644
index 000000000..cdca8e3b6
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/defaultWidth.st
@@ -0,0 +1,4 @@
+default values
+defaultWidth
+
+ ^ 500
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/initialize.st
new file mode 100644
index 000000000..89e424653
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/initialize.st
@@ -0,0 +1,16 @@
+initialization
+initialize
+
+ super initialize.
+
+ self
+ width: self defaultWidth;
+ height: self defaultHeight;
+ color: (self isOutgoing
+ ifTrue: [TCUDefaultValues colorCarrot]
+ ifFalse: [TCUDefaultValues colorLightBlue]);
+ addText;
+ hResizing: #shrinkWrap;
+ vResizing: #shrinkWrap;
+ borderWidth: 0;
+ useRoundedCorners.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/isOutgoing..st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/isOutgoing..st
new file mode 100644
index 000000000..edff07c5f
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/isOutgoing..st
@@ -0,0 +1,4 @@
+accessing
+isOutgoing: aBoolean
+
+ isOutgoing := aBoolean.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/isOutgoing.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/isOutgoing.st
new file mode 100644
index 000000000..be9441a50
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/isOutgoing.st
@@ -0,0 +1,4 @@
+accessing
+isOutgoing
+
+ ^ isOutgoing
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/senderID..st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/senderID..st
new file mode 100644
index 000000000..f37508c1e
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/senderID..st
@@ -0,0 +1,4 @@
+accessing
+senderID: anID
+
+ senderID := anID.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/senderID.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/senderID.st
new file mode 100644
index 000000000..8c0d6da28
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/senderID.st
@@ -0,0 +1,4 @@
+accessing
+senderID
+
+ ^ senderID
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/instance/text..st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/text..st
new file mode 100644
index 000000000..0709c1993
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/instance/text..st
@@ -0,0 +1,4 @@
+accessing
+text: aTextMorph
+
+ text := aTextMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCButton.class/instance/text.st b/packages/TelegramClient-UI.package/TCUMessage.class/instance/text.st
similarity index 100%
rename from packages/TelegramClient-UI.package/TCButton.class/instance/text.st
rename to packages/TelegramClient-UI.package/TCUMessage.class/instance/text.st
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUMessage.class/methodProperties.json
new file mode 100644
index 000000000..c3639103f
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/methodProperties.json
@@ -0,0 +1,17 @@
+{
+ "class" : {
+ "newFromTCCMessage:" : "js 8/2/2020 22:02" },
+ "instance" : {
+ "addText" : "r.s 8/2/2020 18:41",
+ "defaultHeight" : "rs 6/17/2020 20:07",
+ "defaultMargin" : "js 7/31/2020 18:19",
+ "defaultMinTextLength" : "js 7/31/2020 18:03",
+ "defaultTextMargins" : "r.s 8/2/2020 18:39",
+ "defaultWidth" : "r.s 7/31/2020 14:19",
+ "initialize" : "js 8/2/2020 22:03",
+ "isOutgoing" : "js 8/2/2020 22:02",
+ "isOutgoing:" : "js 8/2/2020 22:02",
+ "senderID" : "js 7/31/2020 16:11",
+ "senderID:" : "js 7/31/2020 16:10",
+ "text" : "rs 6/17/2020 19:48",
+ "text:" : "rs 6/17/2020 19:52" } }
diff --git a/packages/TelegramClient-UI.package/TCUMessage.class/properties.json b/packages/TelegramClient-UI.package/TCUMessage.class/properties.json
new file mode 100644
index 000000000..006d32f81
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUMessage.class/properties.json
@@ -0,0 +1,16 @@
+{
+ "category" : "TelegramClient-UI",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "rs 6/17/2020 21:31",
+ "instvars" : [
+ "text",
+ "senderID",
+ "isOutgoing" ],
+ "name" : "TCUMessage",
+ "pools" : [
+ ],
+ "super" : "RectangleMorph",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/README.md b/packages/TelegramClient-UI.package/TCUModal.class/README.md
new file mode 100644
index 000000000..451cda239
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/README.md
@@ -0,0 +1 @@
+This class creates a PopUp window for errors or information
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/class/newWithText.type..st b/packages/TelegramClient-UI.package/TCUModal.class/class/newWithText.type..st
new file mode 100644
index 000000000..d8c6b4df6
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/class/newWithText.type..st
@@ -0,0 +1,7 @@
+instance creation
+newWithText: aString type: aType
+
+ ^ self basicNew
+ text: aString;
+ type: aType;
+ initialize
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/addCloseButton.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/addCloseButton.st
new file mode 100644
index 000000000..98ef6a515
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/addCloseButton.st
@@ -0,0 +1,13 @@
+initialization
+addCloseButton
+
+ | closeButton |
+
+ closeButton := TCUButton new
+ text: 'close';
+ color: TCUDefaultValues colorRed;
+ on: #mouseUp send: #delete to: self.
+ closeButton text color: Color white.
+ closeButton position: (self position x + self defaultSpacing) @ self defaultSpacing.
+
+ self addMorph: closeButton.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultHeight.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultHeight.st
new file mode 100644
index 000000000..7e080b763
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultHeight.st
@@ -0,0 +1,4 @@
+default values
+defaultHeight
+
+ ^ 280
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultOffset.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultOffset.st
new file mode 100644
index 000000000..65dc5f0fd
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultOffset.st
@@ -0,0 +1,4 @@
+default values
+defaultOffset
+
+ ^ 20
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultSpacing.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultSpacing.st
new file mode 100644
index 000000000..2f55932b1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultSpacing.st
@@ -0,0 +1,4 @@
+default values
+defaultSpacing
+
+ ^ 5
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultWidth.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultWidth.st
new file mode 100644
index 000000000..12857a660
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/defaultWidth.st
@@ -0,0 +1,4 @@
+default values
+defaultWidth
+
+ ^ 520
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/initialize.st
new file mode 100644
index 000000000..42eb61c97
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/initialize.st
@@ -0,0 +1,15 @@
+initialization
+initialize
+
+ super initialize.
+
+ self
+ width: self defaultWidth;
+ height: self defaultHeight;
+ borderWidth: 1;
+ borderColor: TCUDefaultValues colorLightBlue;
+ setColor;
+ useRoundedCorners;
+ addCloseButton.
+
+ self setText.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/setColor.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/setColor.st
new file mode 100644
index 000000000..98ad646a3
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/setColor.st
@@ -0,0 +1,5 @@
+drawing
+setColor
+
+ self type = 'information' ifTrue: [self color: Color white].
+ self type = 'error' ifTrue: [self color: Color lightRed].
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/setText.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/setText.st
new file mode 100644
index 000000000..2711bd4fb
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/setText.st
@@ -0,0 +1,7 @@
+drawing
+setText
+
+ self addMorph: (TextMorph new
+ contents: self text;
+ lock;
+ center: (self position + ((self width / 2) @ self defaultOffset))).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/text..st b/packages/TelegramClient-UI.package/TCUModal.class/instance/text..st
new file mode 100644
index 000000000..fdea2e4c0
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/text..st
@@ -0,0 +1,4 @@
+accessing
+text: aString
+
+ text := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/text.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/text.st
new file mode 100644
index 000000000..c9bb36307
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/text.st
@@ -0,0 +1,4 @@
+accessing
+text
+
+ ^ text
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/type..st b/packages/TelegramClient-UI.package/TCUModal.class/instance/type..st
new file mode 100644
index 000000000..281175107
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/type..st
@@ -0,0 +1,5 @@
+accessing
+type: aString
+
+ "Type should be of: {information, error}"
+ type := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/instance/type.st b/packages/TelegramClient-UI.package/TCUModal.class/instance/type.st
new file mode 100644
index 000000000..95c8cb06f
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/instance/type.st
@@ -0,0 +1,4 @@
+accessing
+type
+
+ ^ type
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUModal.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUModal.class/methodProperties.json
new file mode 100644
index 000000000..2f3e780d7
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUModal.class/methodProperties.json
@@ -0,0 +1,16 @@
+{
+ "class" : {
+ "newWithText:type:" : "r.s 7/16/2020 09:07" },
+ "instance" : {
+ "addCloseButton" : "r.s 8/2/2020 19:13",
+ "defaultHeight" : "r.s 7/16/2020 09:04",
+ "defaultOffset" : "r.s 8/2/2020 18:38",
+ "defaultSpacing" : "r.s 8/2/2020 19:14",
+ "defaultWidth" : "r.s 7/16/2020 09:04",
+ "initialize" : "r.s 8/2/2020 19:14",
+ "setColor" : "r.s 7/16/2020 09:17",
+ "setText" : "r.s 8/2/2020 18:38",
+ "text" : "r.s 7/16/2020 09:09",
+ "text:" : "r.s 7/16/2020 09:09",
+ "type" : "r.s 7/16/2020 09:09",
+ "type:" : "r.s 7/16/2020 09:35" } }
diff --git a/TelegramClient-UI.package/TCUChatWindow.class/properties.json b/packages/TelegramClient-UI.package/TCUModal.class/properties.json
similarity index 66%
rename from TelegramClient-UI.package/TCUChatWindow.class/properties.json
rename to packages/TelegramClient-UI.package/TCUModal.class/properties.json
index 8e851e445..031bb927f 100644
--- a/TelegramClient-UI.package/TCUChatWindow.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUModal.class/properties.json
@@ -4,10 +4,11 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "r.s 7/16/2020 09:34",
"instvars" : [
- ],
- "name" : "TCUChatWindow",
+ "text",
+ "type" ],
+ "name" : "TCUModal",
"pools" : [
],
"super" : "RectangleMorph",
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/README.md b/packages/TelegramClient-UI.package/TCUNotification.class/README.md
new file mode 100644
index 000000000..9038043e2
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/README.md
@@ -0,0 +1 @@
+a Push Notification UI
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/class/newWithMessage..st b/packages/TelegramClient-UI.package/TCUNotification.class/class/newWithMessage..st
new file mode 100644
index 000000000..289732d00
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/class/newWithMessage..st
@@ -0,0 +1,6 @@
+instance creation
+newWithMessage: aMessage
+
+ ^ self basicNew
+ text: aMessage message;
+ initialize
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/addTextLabel.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/addTextLabel.st
new file mode 100644
index 000000000..02d2c90c4
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/addTextLabel.st
@@ -0,0 +1,6 @@
+drawing
+addTextLabel
+
+ self addMorphCentered: (TextMorph new
+ contents: (self text truncateWithElipsisTo: 25) asText;
+ lock).
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/calculatePosition.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/calculatePosition.st
new file mode 100644
index 000000000..adff4b806
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/calculatePosition.st
@@ -0,0 +1,4 @@
+accessing
+calculatePosition
+
+ ^ self currentWorld bottomRight - (self defaultWidth @ self defaultHeight) - (self defaultOffset)
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/chatID..st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/chatID..st
new file mode 100644
index 000000000..b15675cf0
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/chatID..st
@@ -0,0 +1,4 @@
+accessing
+chatID: aNumber
+
+ chatID := aNumber.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/chatID.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/chatID.st
new file mode 100644
index 000000000..d732e5f82
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/chatID.st
@@ -0,0 +1,4 @@
+accessing
+chatID
+
+ ^ chatID
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultBorderWidth.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultBorderWidth.st
new file mode 100644
index 000000000..06026fc2e
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultBorderWidth.st
@@ -0,0 +1,4 @@
+default values
+defaultBorderWidth
+
+ ^ 2
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultHeight.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultHeight.st
new file mode 100644
index 000000000..75eced192
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultHeight.st
@@ -0,0 +1,4 @@
+default values
+defaultHeight
+
+ ^ 80
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultOffset.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultOffset.st
new file mode 100644
index 000000000..c2634bb7a
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultOffset.st
@@ -0,0 +1,4 @@
+default values
+defaultOffset
+
+ ^ (20 @ 20)
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultTimeOutDuration.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultTimeOutDuration.st
new file mode 100644
index 000000000..0ef57b5ea
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultTimeOutDuration.st
@@ -0,0 +1,4 @@
+default values
+defaultTimeOutDuration
+
+ ^ 5
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultWidth.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultWidth.st
new file mode 100644
index 000000000..d4cf6d820
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/defaultWidth.st
@@ -0,0 +1,4 @@
+default values
+defaultWidth
+
+ ^ 320
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/initialize.st
new file mode 100644
index 000000000..7de61a188
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/initialize.st
@@ -0,0 +1,11 @@
+initialization
+initialize
+
+ super initialize.
+ self
+ initializeDefaults;
+ openInWorld.
+
+ self
+ position: self calculatePosition;
+ startTimeOut.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/initializeDefaults.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/initializeDefaults.st
new file mode 100644
index 000000000..3a7b717fa
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/initializeDefaults.st
@@ -0,0 +1,11 @@
+initialization
+initializeDefaults
+
+ self
+ color: Color white;
+ borderColor: TCUDefaultValues colorLightBlue;
+ borderWidth: self defaultBorderWidth;
+ useRoundedCorners;
+ height: self defaultHeight;
+ width: self defaultWidth;
+ addTextLabel.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/startTimeOut.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/startTimeOut.st
new file mode 100644
index 000000000..359a011f7
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/startTimeOut.st
@@ -0,0 +1,5 @@
+initialization
+startTimeOut
+
+ self defaultTimeOutDuration seconds wait.
+ self fadeOut.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/text..st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/text..st
new file mode 100644
index 000000000..fdea2e4c0
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/text..st
@@ -0,0 +1,4 @@
+accessing
+text: aString
+
+ text := aString.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/instance/text.st b/packages/TelegramClient-UI.package/TCUNotification.class/instance/text.st
new file mode 100644
index 000000000..c9bb36307
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/instance/text.st
@@ -0,0 +1,4 @@
+accessing
+text
+
+ ^ text
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUNotification.class/methodProperties.json
new file mode 100644
index 000000000..3849fd659
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/methodProperties.json
@@ -0,0 +1,18 @@
+{
+ "class" : {
+ "newWithMessage:" : "j 7/16/2020 13:23" },
+ "instance" : {
+ "addTextLabel" : "js 8/2/2020 10:00",
+ "calculatePosition" : "rs 7/5/2020 14:42",
+ "chatID" : "rs 7/5/2020 14:31",
+ "chatID:" : "rs 7/5/2020 14:31",
+ "defaultBorderWidth" : "r.s 8/2/2020 18:37",
+ "defaultHeight" : "rs 7/5/2020 14:18",
+ "defaultOffset" : "rs 7/5/2020 14:43",
+ "defaultTimeOutDuration" : "r.s 8/2/2020 18:36",
+ "defaultWidth" : "rs 7/5/2020 14:44",
+ "initialize" : "rs 7/5/2020 14:43",
+ "initializeDefaults" : "r.s 8/2/2020 18:37",
+ "startTimeOut" : "r.s 8/2/2020 18:36",
+ "text" : "rs 7/5/2020 14:28",
+ "text:" : "rs 7/5/2020 14:28" } }
diff --git a/packages/TelegramClient-UI.package/TCUNotification.class/properties.json b/packages/TelegramClient-UI.package/TCUNotification.class/properties.json
new file mode 100644
index 000000000..30f1882a9
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUNotification.class/properties.json
@@ -0,0 +1,15 @@
+{
+ "category" : "TelegramClient-UI",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "j 7/16/2020 13:26",
+ "instvars" : [
+ "text",
+ "chatID" ],
+ "name" : "TCUNotification",
+ "pools" : [
+ ],
+ "super" : "RectangleMorph",
+ "type" : "normal" }
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/README.md b/packages/TelegramClient-UI.package/TCUTelegram.class/README.md
new file mode 100644
index 000000000..8487da997
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/README.md
@@ -0,0 +1 @@
+starting point for TC-UI, this starts authentication and main window
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/class/initialize.st b/packages/TelegramClient-UI.package/TCUTelegram.class/class/initialize.st
new file mode 100644
index 000000000..ed3d3574d
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/class/initialize.st
@@ -0,0 +1,4 @@
+class initialization
+initialize
+
+ self registerInWorldMenu.
\ No newline at end of file
diff --git a/TelegramClient-UI.package/TCUAuthentication.class/class/newWithCore..st b/packages/TelegramClient-UI.package/TCUTelegram.class/class/newWithCore..st
similarity index 79%
rename from TelegramClient-UI.package/TCUAuthentication.class/class/newWithCore..st
rename to packages/TelegramClient-UI.package/TCUTelegram.class/class/newWithCore..st
index 806d37952..23df20701 100644
--- a/TelegramClient-UI.package/TCUAuthentication.class/class/newWithCore..st
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/class/newWithCore..st
@@ -1,4 +1,4 @@
-as yet unclassified
+instance creation
newWithCore: aCore
^ self basicNew
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/class/newWithTCCCore.st b/packages/TelegramClient-UI.package/TCUTelegram.class/class/newWithTCCCore.st
new file mode 100644
index 000000000..9f96e4ea1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/class/newWithTCCCore.st
@@ -0,0 +1,4 @@
+instance creation
+newWithTCCCore
+
+ ^ self newWithCore: TCCCore new
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/class/registerInWorldMenu.st b/packages/TelegramClient-UI.package/TCUTelegram.class/class/registerInWorldMenu.st
new file mode 100644
index 000000000..70b248f3e
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/class/registerInWorldMenu.st
@@ -0,0 +1,4 @@
+menu
+registerInWorldMenu
+
+ TheWorldMenu registerOpenCommand: {'Telegram'. {TCUTelegram. #newWithTCCCore}. 'opens a Telegram Client'}.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/instance/core..st b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/core..st
new file mode 100644
index 000000000..3844709d3
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/core..st
@@ -0,0 +1,4 @@
+accessing
+core: aCore
+
+ core := aCore.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/instance/core.st b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/core.st
new file mode 100644
index 000000000..7652dd8d1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/core.st
@@ -0,0 +1,4 @@
+accessing
+core
+
+ ^ core
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/instance/currentWindow..st b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/currentWindow..st
new file mode 100644
index 000000000..95c179a48
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/currentWindow..st
@@ -0,0 +1,4 @@
+accessing
+currentWindow: aMorph
+
+ currentWindow := aMorph.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/instance/currentWindow.st b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/currentWindow.st
new file mode 100644
index 000000000..b1f0e3115
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/currentWindow.st
@@ -0,0 +1,4 @@
+accessing
+currentWindow
+
+ ^ currentWindow
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/initialize.st
new file mode 100644
index 000000000..f888f70e1
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/instance/initialize.st
@@ -0,0 +1,7 @@
+initialization
+initialize
+
+ super initialize.
+
+ self currentWindow: (TCUAuthentication newWithCore: self core).
+ self currentWindow openCenteredInWorld.
\ No newline at end of file
diff --git a/packages/TelegramClient-UI.package/TCUTelegram.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUTelegram.class/methodProperties.json
new file mode 100644
index 000000000..9b973ac2c
--- /dev/null
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/methodProperties.json
@@ -0,0 +1,12 @@
+{
+ "class" : {
+ "initialize" : "js 8/2/2020 14:31",
+ "newWithCore:" : "js 8/2/2020 14:29",
+ "newWithTCCCore" : "rs 6/25/2020 10:16",
+ "registerInWorldMenu" : "js 8/2/2020 14:28" },
+ "instance" : {
+ "core" : "js 5/31/2020 20:04",
+ "core:" : "js 5/31/2020 20:04",
+ "currentWindow" : "r.s 7/13/2020 17:11",
+ "currentWindow:" : "r.s 7/13/2020 17:11",
+ "initialize" : "js 7/31/2020 23:22" } }
diff --git a/TelegramClient-UI.package/TCUApp.class/properties.json b/packages/TelegramClient-UI.package/TCUTelegram.class/properties.json
similarity index 63%
rename from TelegramClient-UI.package/TCUApp.class/properties.json
rename to packages/TelegramClient-UI.package/TCUTelegram.class/properties.json
index d7b2098d5..97d5f6ffc 100644
--- a/TelegramClient-UI.package/TCUApp.class/properties.json
+++ b/packages/TelegramClient-UI.package/TCUTelegram.class/properties.json
@@ -4,10 +4,11 @@
],
"classvars" : [
],
- "commentStamp" : "",
+ "commentStamp" : "js 6/13/2020 18:59",
"instvars" : [
- "core" ],
- "name" : "TCUApp",
+ "core",
+ "currentWindow" ],
+ "name" : "TCUTelegram",
"pools" : [
],
"super" : "Object",