diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..71842bc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+CMakeLists.txt.user*
+friendiqa.pro.user*
+IJPSvd.json
diff --git a/BackgroundSync.patch b/BackgroundSync.patch
new file mode 100644
index 0000000..263f528
--- /dev/null
+++ b/BackgroundSync.patch
@@ -0,0 +1,11 @@
+--- src/common/alarmlinux.cpp
++++ src/common/alarmlinux.cpp
+@@ -67,7 +67,7 @@
+ stream << "Description=Run friendiqa background sync" << Qt::endl << Qt::endl;
+ stream << "[Service]" << Qt::endl;
+ stream << "Type=oneshot" << Qt::endl;
+- stream << "ExecStart=/usr/bin/friendiqa -service" << Qt::endl;
++ stream << "ExecStart=flatpak run de.manic.friendiqa -service" << Qt::endl;
+ }
+
+ QString nameTimer ="friendiqa-sync.timer";
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f2f3f2..81cab7a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,118 +1,219 @@
+## v0.6.9
-## v0.5 ##
-* Redesign due to QML Components 1 being deprecated in Qt 5.12: Slideview for News, left Drawer for Settings, message creation in listview header
-* Android Notifications for News, DMs, Replies
-* Global app config separated from account config
+* Separate window for new messages with more formatting options
+* Replaced all Fontawesome icons with system icons
+* Switch between OAuth2 and Basic Auth
+* Background sync with systemd-timer and removal of system tray
+## v0.6.8
-## v0.4 ##
-* Background sync for friends timeline (interval on config page must be > 0) for Android > 5
-* Replies timeline
-* Bugfix: App asks for storage permission on first start
+* OAuth2 as signup method
+* New translation: Dutch
+## v0.6.7
-## v0.3.4 ##
-* Direct message creation from profile page works again
-* Profile image upload works again
-* Viewing private album pictures of contacts works again
-* On first start servername from https://dir.friendica.social/servers/surprise selected
-* Register button opens webview of registration page on server
+* Upload multiple images for post and add image descriptions
+* Block user
+* Report user
+* Create Calendar entry from post text
+## v0.6.6
-## v0.3.3 ##
-* Update for OpenSSL and At
-* Experimental support for Peertube (links are expanded to video widget)
-* Some Unicode emojis
-* Redesign of contact details (click on contact opens in new stack and shows last news)
+* Create event
+* Delete event
+* New sorting of conversations
+## v0.6.5
-## v0.3.2 ##
-* For news containing url ending with mp3, mp4, avi, webm, ogg: media can be played in app
-* Pictures can be renamed or moved to another album
-* Bugfix: random crashes for conversations
-* Bugfix: attach image to message works again
-* Bugfix: check for nickname on Server has been removed due to API change
+* Fix reply in Friendica 3/2022 version due to API bug
+* Image downloads work again
+* Some additional emojis
+## v0.6.4
-## v0.3.1 ##
-* By popular demand: Conversations open in a new stack, like in Twidere
-* Conversations open after (long) press on news, like in Twidere
-* Image attachments are shown below text and can be enlarged, like in Twidere (solves issue #8)
-* New messages are html, line breaks work (solves issue #7)
+* Search for new contacts (hashtags, names)
+* Filter contacts
+* many new emojis
+* Replaced Favorite button with Reply button due to buggy Favourite API
+* Rebuild contacts handling due to buggy Contacts API
+* Removed permissions for new messages due to buggy Contacts API
+* Sync all accounts in background (not only active)
+## v0.6.3
-## v0.3 ##
-* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6)
-* Refactoring of news part
-* Search button for news
-* Click on hashtag in newsitem starts search for news with that word
-* Public timeline
-* Timeline for selected group
-* Small redesign of SendMessage page
+* Dark theme
+* Account Page: list of largest servers for server field
+* Settings page: Tabs for different settings
+* Conversation opens on short click on news item
+* Linux: Option to Autostart on System start
+## v0.6.2
-## v0.2.2 ##
-* Fix for [issue 5](https://github.com/LubuWest/Friendiqa/issues/5)
-* Link to list of public server on Config Tab
-* Small redesign of SendMessage page
-* Intents for texts/urls (Send text or url from everywhere to create message)
+* Follow and Unfollow contacts (Friendica 2021.07 required)
+* Linux: App stays in systemtray after close, syncs in background
+* bugfix for bulk image upload and download of public images
+* bugfix for conversations in timeline
+## v0.6.1
-## v0.2.1 ##
-* Fix for [issue 4](https://github.com/LubuWest/Friendiqa/issues/4)
-* Fix for Friendica [issue 4689](https://github.com/friendica/friendica/issues/4689)
-* Long posts are automatically truncated
-* Intents for pictures (Send one image from gallery: attach to message, send multiple images: upload to album)
+* Add requestLegacyExternalStorage in AndroidManifest for attachment permissions
+* Refresh timeline on start for Linux
+* DropArea bugfix for Flatpak
+## v0.6
-## v0.2 ##
-# News #
-* Profile image download completely reworked, resulting in speed improvement
+* New language: Hungarian thank to urbalazs (https://www.urbalazs.hu)
+* Multiple photos in post open in separate slideshow
+* Layout redesign
+* Adaptive sidebar
+* Sync Friendship Requests, approve/deny/ignore requests
+* Events: show upcoming events below calendar
+* Linux: Drag&Drop for new messages and photo upload
+* Linux: Remember app size
-# Contacts #
-* New profile tab, data of public and private profiles shown
-* Change profile picture
-* For friends image button shows private images thanks to new remoteAuth API (Friendica 3.6 server required) --> private holiday pictures have finally arrived!
-* For friends calendar button shows private events thanks to new remoteAuth API (Friendica 3.6 server required)
-* News button for forum accounts shows news published via that forum
+## v0.5.3
-# Images #
-* Complete rework of image download, fixes bug with private images
-* Download all or only new images
+* Implementation of new events API (incl. sync and notification) for Friendica version >= 20.03
+* Indentation to see replied to newsitem for conversation view
+* News view type config moved from account page to config page
+* Simplification of account page on first start
+* Bugfixes
-# Config #
-* Check if nickname exist on server
-* Check if password is correct
-* Account deletion now also removes news, image data and events from local db
+## v0.5.2
-# Translations #
-* Italian thanks to Davide de Prisco
+* Redesign of news item
+* Background sync for Android >8.0
+* Bugfixes
+## v0.5.1
+
+* Videos open in full screen
+* Youtube videos open in app
+* Option to minimize #nsfw post
+* Rotate image in messageSend component
+
+## v0.5
+
+* Redesign due to QML Components 1 being deprecated in Qt 5.12: Slideview for News, left Drawer for Settings, message creation in listview header
+* Android Notifications for News, DMs, Replies
+* Global app config separated from account config
+
+## v0.4
+
+* Background sync for friends timeline (interval on config page must be > 0) for Android > 5
+* Replies timeline
+* Bugfix: App asks for storage permission on first start
+
+## v0.3.4
+
+* Direct message creation from profile page works again
+* Profile image upload works again
+* Viewing private album pictures of contacts works again
+* On first start servername from https://dir.friendica.social/servers/surprise selected
+* Register button opens webview of registration page on server
+
+## v0.3.3
+
+* Update for OpenSSL and At
+* Experimental support for Peertube (links are expanded to video widget)
+* Some Unicode emojis
+* Redesign of contact details (click on contact opens in new stack and shows last news)
+
+## v0.3.2
+
+* For news containing url ending with mp3, mp4, avi, webm, ogg: media can be played in app
+* Pictures can be renamed or moved to another album
+* Bugfix: random crashes for conversations
+* Bugfix: attach image to message works again
+* Bugfix: check for nickname on Server has been removed due to API change
+
+## v0.3.1
+
+* By popular demand: Conversations open in a new stack, like in Twidere
+* Conversations open after (long) press on news, like in Twidere
+* Image attachments are shown below text and can be enlarged, like in Twidere (solves issue #8)
+* New messages are html, line breaks work (solves issue #7)
+
+## v0.3
+
+* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6)
+* Refactoring of news part
+* Search button for news
+* Click on hashtag in newsitem starts search for news with that word
+* Public timeline
+* Timeline for selected group
+* Small redesign of SendMessage page
+
+## v0.2.2
+
+* Fix for [issue 5](https://github.com/LubuWest/Friendiqa/issues/5)
+* Link to list of public server on Config Tab
+* Small redesign of SendMessage page
+* Intents for texts/urls (Send text or url from everywhere to create message)
+
+## v0.2.1
+
+* Fix for [issue 4](https://github.com/LubuWest/Friendiqa/issues/4)
+* Fix for Friendica [issue 4689](https://github.com/friendica/friendica/issues/4689)
+* Long posts are automatically truncated
+* Intents for pictures (Send one image from gallery: attach to message, send multiple images: upload to album)
+
+## v0.2
+
+# News
+
+* Profile image download completely reworked, resulting in speed improvement
+
+# Contacts
+
+* New profile tab, data of public and private profiles shown
+* Change profile picture
+* For friends image button shows private images thanks to new remoteAuth API (Friendica 3.6 server required) --> private holiday pictures have finally arrived!
+* For friends calendar button shows private events thanks to new remoteAuth API (Friendica 3.6 server required)
+* News button for forum accounts shows news published via that forum
+
+# Images
+
+* Complete rework of image download, fixes bug with private images
+* Download all or only new images
+
+# Config
+
+* Check if nickname exist on server
+* Check if password is correct
+* Account deletion now also removes news, image data and events from local db
+
+# Translations
+
+* Italian thanks to Davide de Prisco
## v0.1.2##
-* FIX: Include openssl v1.0.2m for SSL connections in Android v7 and above
+* FIX: Include openssl v1.0.2m for SSL connections in Android v7 and above
## v0.1.1##
-* FIX: Spanish translation
-* FIX: Empty Newsview after deletion of first newsitem
+* FIX: Spanish translation
+* FIX: Empty Newsview after deletion of first newsitem
## v0.1##
-# News #
+# News
-* Native Android image selector for new message
-* Click on contacts shows contact details on news page
-* Fix problem with news list after deletion of item
+* Native Android image selector for new message
+* Click on contacts shows contact details on news page
+* Fix problem with news list after deletion of item
-# Contacts #
-* Clean contacts with no news
+# Contacts
-# Images #
-* Upload pictures with description to album (permissions cannot be set due to API problems)
-* Delete pictures or albums from client and server (long press on picture in overview)
-* Fix problem when enlarging photo
+* Clean contacts with no news
-# Translations #
-* German, Spanish
+# Images
+
+* Upload pictures with description to album (permissions cannot be set due to API problems)
+* Delete pictures or albums from client and server (long press on picture in overview)
+* Fix problem when enlarging photo
+
+# Translations
+
+* German, Spanish
diff --git a/FlatpakAutostart.patch b/FlatpakAutostart.patch
new file mode 100644
index 0000000..0905eb1
--- /dev/null
+++ b/FlatpakAutostart.patch
@@ -0,0 +1,12 @@
+--- source-linux/common/filesystem.cpp
++++ source-linux/common/filesystem.cpp
+@@ -165,7 +165,7 @@
+ QTextStream stream(&file);
+ stream << "[Desktop Entry]" << Qt::endl;
+ stream << "Name=Friendiqa" << Qt::endl;
+- stream << "Exec=friendiqa -background %u" << Qt::endl;
++ stream << "Exec=flatpak run de.manic.friendiqa -background %u" << Qt::endl;
+ stream << "Terminal=false" << Qt::endl;
+ stream << "Icon=Friendiqa.svg" << Qt::endl;
+ stream << "Type=Application" << Qt::endl;
+
diff --git a/PrivacyPolicy.md b/PrivacyPolicy.md
index c15eb20..716bb9e 100644
--- a/PrivacyPolicy.md
+++ b/PrivacyPolicy.md
@@ -5,5 +5,4 @@ You have probably selected Friendica as your preferred social network because yo
Storing some pieces of user data on the device is necessary for some app features, other apps on your device may not access this data (keeping app’s own database storage protected from other apps is guaranteed by Android). The app has been programmed so that stored information contain any personal data (only login data and id number of last seen post will be transferred to servers). Photos from the albums and contact images are stored in a public directory on the device. Other apps may access these files and the Friendiqa needs access to this directory.
To send images from the Android gallery the app needs access to picture databases on the device.
-This app don’t collect any usage statistics. In addition, no information is sent from your Smartphone to me as a developer or to a website associated with me.
-On first start, the website https://dir.friendica.social/servers/surprise is contacted and the selected server shown in the app.
+This app doesn’t collect any usage statistics. In addition, no information is sent from your smartphone to me as a developer or to a website associated with me.
diff --git a/README.md b/README.md
index 28ae545..e80c04c 100644
--- a/README.md
+++ b/README.md
@@ -1,122 +1,134 @@
-## Friendiqa ##
-
-QML based client for the Friendica Social Network.
- Tabs for news (incl. Direct Messages), friends, photos and events.
- OS: currently Linux and Android (4.3 Jelly Bean, 5.1 for background sync).
- Source code is a QtCreator project.
-
-## Screenshots ##
-
-
-
-
-
-
-
-
-## Features ##
-
-# News #
-Currently supported:
-* Shows Posts from friends, replies, Direct Messages and notifications (in swipe view), selected group, replies, favorited messages, public timeline
-* Background sync with configurable interval of 15 min to 2h for active contact for friends timeline, replies and DMs (Android 5.1 required)
-* Android notifications for new items in friends timeline, replies and DMs
-* Search for news
-* Click on hashtag in newsitem starts search for news with that word
-* Click on image shows image fullscreen
-* For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app
-* Open links in external browser
-* Click on contact photo for contact details and last news
-* Click on like text for additional contact info
-* Deletion, Reposting, Answering of Posts
-* Expand truncated news items
-* Liking, disliking, favoriting
-* Attending for event posts
-* Update fetches new posts (up to last 50) since last in local DB
-* More shows older posts from local DB
-* Create new Message with images or direct messages, Contact/Group access rights (can be stored), smileys
-* Send image from Android gallery
-* Send text or urls from other apps to Friendiqa
-* Native Android image dialog
-
-ToDo:
-* Videos and other binary data as attachment (sending, not supported in API)
-* More than one attachment
-* Attachments for Direct messages (currently not supported in API)
-
-
-# Friends #
-Currently supported:
-* Tabs for own profiles, friends, other contacts and groups
-* Show profile(s) of user and change profile picture
-* List of all known contacts with locally downloaded pictures
-* Additional information, last messages and other functionality shown in news tab
-* Show public and private pictures of contact (screenscraping of contact's website, works only with certain theme)
-* Show public and private events of contact
-* Show members of groups
-* Open website of contact or connect page (for other contacts)
-* Clean other contacts with no news
-
-ToDo:
-* More information for contact from description page, possibly private information for friends
- (needs API change)
-* Groups: create, change, delete
- (needs API change)
-
-
-# Images #
-Currently supported:
-* Download public and private own images to local directory
-* Upload picture to album with descriptions(public), send from gallery
-* Delete own pictures and albums on client and server
-* Change name or album of existing picture
-* Show albums in grid, show images in album in grid and fullscreen
-* Show public and private (Friendica 3.6 server required) albums and images of contacts
-* Pinch to zoom, swipe to scroll
-
-ToDo:
-* Upload private images
-
-
-# Events #
-Currently supported:
-* Download own public events
-* Show public and private events of Friendica contacts (Friendica >3.6 server required)
-* List view of events of selected date
-* Click on event to show details
-
-ToDo
-* Show own private events (needs API)
-* Create events (needs API)
-
-
-# Config/Accounts #
-Currently supported:
-* Multiple accounts
-* View mode for news (tree or timeline)
-* Maximum news (deleted after use of Quit button)
-* Sync home timeline, replies, DM, Notify yes/no
-
-ToDo
-* OAuth?
-
-
-# Other #
-ToDo
-* Video tab
-* Translation
-* Blingbling
-
-
-# Translations #
-* German, Spanish, Italian
-* To contribute translations: Have a look at linux-sources/translations/friendiqa-de.ts and open it with an editor. It's an xml file. Change values and send me the file/do pull request.
-
-# Install #
-* F-Droid binary repository: [https://www.ma-nic.de/fdroid/repo](https://www.ma-nic.de/fdroid/repo) or for those who get the "error getting index file" from F-Droid client due to outdated crypto libraries the url without encryption: [http://www.ma-nic.de/fdroid/repo](http://www.ma-nic.de/fdroid/repo) To include repo in Fdroid: Open config --> package sources --> plus symbol --> paste url
-* [Google Playstore](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa)
-
-
-## License ##
-Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License.
-
+## Friendiqa
+
+QML based client for the Friendica Social Network. Tabs for news (incl. Direct Messages), friends, photos and events. OS: currently Linux and Android (4.3 Jelly Bean, 5.1 for background sync). Source code is a QtCreator project.
+
+## Screenshots
+
+    
+
+## Features
+
+# News
+
+Currently supported:
+
+* Shows Posts from friends, replies, Direct Messages and notifications (in swipe view), selected group, replies, favorited messages, public timeline
+* Background sync with configurable interval of 15 min to 2h for active user for friends timeline, replies and DMs (Android 5.1 required)
+* Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs
+* Search for news
+* Click on hashtag in newsitem starts search for news with that word
+* Only first photo attachment in post is shown, click for more images and fullscreen image
+* Click on video shows video fullscreen
+* For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app
+* Open links in external browser
+* Click on contact photo for contact details and last news
+* Click on like text for additional contact info
+* Click on post text opens conversation
+* Deletion, Reposting, Answering of Posts
+* Expand truncated news items
+* Liking, disliking
+* Attending for event posts
+* Update fetches new posts (up to last 50) since last in local DB
+* More shows older posts from local DB
+* Create new Message with images or direct messages, smileys in new window
+* Send image(s) from Android gallery
+* Send text or urls from other apps to Friendiqa
+* Native Android image dialog
+
+ToDo:
+
+* Videos and other binary data as attachment (sending, not supported in API)
+* Attachments for Direct messages (currently not supported in API)
+
+# Friends
+
+Currently supported:
+
+* Tabs for own profiles, friends, other contacts and groups
+* Show profile(s) of user and change profile picture
+* List of all known contacts with locally downloaded pictures
+* Follow/unfollow or block/unblock contacts
+* Search for new contacts according to topic
+* Show follow requests; approve, deny, ignore requests
+* Additional information, last messages and other functionality shown in news tab
+* Show public and private pictures of contact (screenscraping of contact's website, works only with certain theme)
+* Show public and private events of contact
+* Show members of groups
+* Open website of contact
+* Clean other contacts with no news
+
+ToDo:
+
+* More information for contact from description page, possibly private information for friends (needs API change)
+* Groups: create, change, delete (needs API change)
+
+# Images
+
+Currently supported:
+
+* Download public own images to local directory (API is currently broken)
+* Upload public picture to album with descriptions, send from gallery (API is currently broken)
+* Delete own pictures and albums on client and server
+* Change name or album of existing picture
+* Show albums in grid, show images in album in grid and fullscreen
+* Show public albums and images of contacts
+* Pinch to zoom, swipe to scroll
+
+ToDo:
+
+* Upload private images
+
+# Events
+
+Currently supported:
+
+* Show own events
+* Show public events of Friendica contacts
+* List view of events of selected date
+* Click on event to show details
+* Create event
+* Delete event
+
+ToDo
+
+* Show more details and attendance of events (needs API)
+
+# Config/Accounts
+
+Currently supported:
+
+* Multiple accounts
+* Dark Mode
+* View mode for news (conversation tree or timeline)
+* Maximum news (deleted after use of Quit button)
+* Set default news tabs
+* Sync home timeline, replies, DM, Events, friend requests; Notify yes/no
+* Hide #nsfw
+* OAuth2 as authorization method
+
+# Other
+
+* on Linux: syncs in background via systemd-timer
+
+ToDo
+
+* Video tab
+* Translation
+* Blingbling
+
+# Translations
+
+* German, Spanish, Italian, Hungarian, Dutch
+* To contribute translations:
+
+# Install
+
+* F-Droid binary repository: or for those who get the "error getting index file" from F-Droid client due to outdated crypto libraries the url without encryption: To include repo in Fdroid: Open config --> package sources --> plus symbol --> paste url
+* [Google Playstore](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa)
+* Arch User Repository:
+* Flatpak:
+* Flatpak for Mobile Linux:
+
+## License
+
+Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License.
diff --git a/Screenshots/ConfigTab.jpg b/Screenshots/ConfigTab.jpg
index ed2b9da..ca61dc3 100644
Binary files a/Screenshots/ConfigTab.jpg and b/Screenshots/ConfigTab.jpg differ
diff --git a/Screenshots/EventsTab.jpg b/Screenshots/EventsTab.jpg
index 3439b05..703860f 100644
Binary files a/Screenshots/EventsTab.jpg and b/Screenshots/EventsTab.jpg differ
diff --git a/Screenshots/FriendsTab.jpg b/Screenshots/FriendsTab.jpg
index 6258f55..83bbe17 100644
Binary files a/Screenshots/FriendsTab.jpg and b/Screenshots/FriendsTab.jpg differ
diff --git a/Screenshots/LeftDrawer.jpg b/Screenshots/LeftDrawer.jpg
new file mode 100644
index 0000000..7facd16
Binary files /dev/null and b/Screenshots/LeftDrawer.jpg differ
diff --git a/Screenshots/NewMessage.jpg b/Screenshots/NewMessage.jpg
new file mode 100644
index 0000000..bcff846
Binary files /dev/null and b/Screenshots/NewMessage.jpg differ
diff --git a/Screenshots/NewsTab.jpg b/Screenshots/NewsTab.jpg
index 047f7f4..dc0817d 100644
Binary files a/Screenshots/NewsTab.jpg and b/Screenshots/NewsTab.jpg differ
diff --git a/Screenshots/PhotoTab.jpg b/Screenshots/PhotoTab.jpg
index 6655493..8b98b53 100644
Binary files a/Screenshots/PhotoTab.jpg and b/Screenshots/PhotoTab.jpg differ
diff --git a/source-android/CMakeLists.txt b/source-android/CMakeLists.txt
new file mode 100644
index 0000000..c47a156
--- /dev/null
+++ b/source-android/CMakeLists.txt
@@ -0,0 +1,96 @@
+# TEMPLATE = app
+# TARGET = friendiqa
+# CONFIG += release
+# QT += qml quick gui widgets sql webview dbus webengine
+
+
+cmake_minimum_required(VERSION 3.1.0)
+
+project(friendiqa VERSION 0.6 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(CMAKE_VERSION VERSION_LESS "3.7.0")
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+endif()
+
+find_package(Qt5 COMPONENTS Widgets Quick Sql DBus WebView REQUIRED)
+
+#Webview Webengine
+
+set(MOC_SOURCES common/uploadableimage.h
+ common/xhr.h
+ common/filesystem.h
+ common/remoteauthasyncimageprovider.h
+ common/updatenews.h
+ common/alarm.h)
+
+set(SOURCES common/friendiqa.cpp
+ common/uploadableimage.cpp
+ common/xhr.cpp
+ common/filesystem.cpp
+ common/remoteauthasyncimageprovider.cpp
+ common/updatenews.cpp
+ common/alarmandroid.cpp)
+
+include_directories(common)
+
+add_executable(friendiqa ${SOURCES} ${MOC_SOURCES} application.qrc)
+
+target_link_libraries(friendiqa Qt::Core)
+target_link_libraries(friendiqa Qt::Widgets)
+target_link_libraries(friendiqa Qt::Quick)
+target_link_libraries(friendiqa Qt::Sql)
+target_link_libraries(friendiqa Qt::WebView)
+target_link_libraries(friendiqa Qt::DBus)
+# target_link_libraries(friendiqa Qt::Webengine)
+
+# qt5_use_modules(friendiqa Core Widgets Quick Sql DBus)
+
+install(TARGETS friendiqa DESTINATION bin)
+
+#RESOURCES = application.qrc
+
+# OTHER_FILES += qml/friendiqa.qml \
+# translations/*.ts \
+# qml/*.qml
+# qml/newsqml/*.qml
+# qml/contactqml/*.qml
+# qml/photoqml/*.qml
+# qml/configqml/*.qml
+# js/*.js
+
+#TRANSLATIONS += translations/friendiqa-de.ts \
+# translations/friendiqa-es.ts \
+# translations/friendiqa-it.ts
+# HEADERS += \
+# common/uploadableimage.h \
+# common/xhr.h \
+# common/filesystem.h \
+# common/remoteauthasyncimageprovider.h \
+# common/updatenews.h \
+# common/alarm.h
+
+#DISTFILES += \
+# qml/calendarqml/*.qml \
+# translations/*.ts \
+# translations/*.qm \
+# qml/*.qml \
+# qml/newsqml/*.qml \
+# qml/contactqml/*.qml \
+# qml/photoqml/*.qml \
+# qml/configqml/*.qml \
+# js/*.js \
+
+
+# target.path=/usr/bin
+# desktop.path = /usr/share/applications
+# desktop.files = images/de.ma-nic.Friendiqa.desktop
+# icon.path = /usr/share/icons/hicolor/scalable/apps
+# icon.files = images/Friendiqa.svg
+# INSTALLS+=target desktop icon
diff --git a/source-android/android/AndroidManifest.xml b/source-android/android/AndroidManifest.xml
index d71d476..277b677 100644
--- a/source-android/android/AndroidManifest.xml
+++ b/source-android/android/AndroidManifest.xml
@@ -1,7 +1,20 @@
-
-
-
+
+
+
+
+
+
+
@@ -17,6 +30,10 @@
+
+
+
+
@@ -24,22 +41,33 @@
-
-
+
-
+
+
+
+
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -61,40 +104,37 @@
-
+
+
+ -->
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/source-android/android/arm/libcrypto_1_1.so b/source-android/android/arm/libcrypto_1_1.so
new file mode 100644
index 0000000..07ec588
Binary files /dev/null and b/source-android/android/arm/libcrypto_1_1.so differ
diff --git a/source-android/android/arm/libssl_1_1.so b/source-android/android/arm/libssl_1_1.so
new file mode 100644
index 0000000..5aac52f
Binary files /dev/null and b/source-android/android/arm/libssl_1_1.so differ
diff --git a/source-android/android/arm64/libcrypto_1_1.so b/source-android/android/arm64/libcrypto_1_1.so
new file mode 100644
index 0000000..43653f8
Binary files /dev/null and b/source-android/android/arm64/libcrypto_1_1.so differ
diff --git a/source-android/android/arm64/libssl_1_1.so b/source-android/android/arm64/libssl_1_1.so
new file mode 100644
index 0000000..5590c78
Binary files /dev/null and b/source-android/android/arm64/libssl_1_1.so differ
diff --git a/source-android/android/build.gradle b/source-android/android/build.gradle
index f4f2592..01264a5 100644
--- a/source-android/android/build.gradle
+++ b/source-android/android/build.gradle
@@ -1,33 +1,31 @@
buildscript {
repositories {
+ google()
jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.1.0'
+ classpath "com.android.tools.build:gradle:4.1.0"
}
}
-allprojects {
- repositories {
- jcenter()
- }
+repositories {
+ google()
+ jcenter()
+ maven {
+ url "https://maven.google.com"
+ }
}
apply plugin: 'com.android.application'
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
-}
-
-//apply plugin: 'android-library'
-
-dependencies {
- compile 'com.android.support:support-v4:25.3.1'
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}
dependencies {
- compile 'com.android.support:support-compat:25.3.1'
+ compile 'androidx.appcompat:appcompat:1.4.2'
}
android {
@@ -46,15 +44,21 @@ android {
compileSdkVersion androidCompileSdkVersion.toInteger()
- buildToolsVersion androidBuildToolsVersion
+ buildToolsVersion '31.0.0'
+ compileSdkVersion 33
+ defaultConfig {
+ minSdkVersion 26
+ targetSdkVersion 31
+ resConfigs "en"
+ }
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qt5AndroidDir + '/res', 'res']
- resources.srcDirs = ['src']
+ resources.srcDirs = ['resources']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
@@ -64,6 +68,11 @@ android {
lintOptions {
abortOnError false
}
+
+ // Do not compress Qt binary resources file
+ aaptOptions {
+ noCompress 'rcc'
+ }
}
apply from: "androidnative.gradle"
setAndroidNativePath("/../androidnative.pri");
diff --git a/source-android/android/gradle.properties b/source-android/android/gradle.properties
index 45a105a..82755ae 100644
--- a/source-android/android/gradle.properties
+++ b/source-android/android/gradle.properties
@@ -1,4 +1,4 @@
-androidBuildToolsVersion=25.0.3
-androidCompileSdkVersion=27
buildDir=.build
-qt5AndroidDir=/home/pankraz/Qt/5.11.1/android_armv7/src/android/java
+android.useAndroidX=true
+android.enableJetifier=true
+android.enforceUniquePackageName=false
diff --git a/source-android/android/gradle/wrapper/gradle-wrapper.jar b/source-android/android/gradle/wrapper/gradle-wrapper.jar
index 8c0fb64..f6b961f 100644
Binary files a/source-android/android/gradle/wrapper/gradle-wrapper.jar and b/source-android/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/source-android/android/gradle/wrapper/gradle-wrapper.properties b/source-android/android/gradle/wrapper/gradle-wrapper.properties
index 0c71e76..186b715 100644
--- a/source-android/android/gradle/wrapper/gradle-wrapper.properties
+++ b/source-android/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/source-android/android/gradlew b/source-android/android/gradlew
index 91a7e26..cccdd3d 100644
--- a/source-android/android/gradlew
+++ b/source-android/android/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -6,47 +6,6 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
+cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -90,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/source-android/android/gradlew.bat b/source-android/android/gradlew.bat
index aec9973..f955316 100644
--- a/source-android/android/gradlew.bat
+++ b/source-android/android/gradlew.bat
@@ -1,90 +1,84 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/source-android/android/libcrypto.so b/source-android/android/libcrypto.so
deleted file mode 100644
index 54e1a05..0000000
Binary files a/source-android/android/libcrypto.so and /dev/null differ
diff --git a/source-android/android/libssl.so b/source-android/android/libssl.so
deleted file mode 100644
index 4ffd83f..0000000
Binary files a/source-android/android/libssl.so and /dev/null differ
diff --git a/source-android/android/local.properties b/source-android/android/local.properties
deleted file mode 100644
index ada6c98..0000000
--- a/source-android/android/local.properties
+++ /dev/null
@@ -1 +0,0 @@
-sdk.dir=/home/pankraz/android-sdk_alt
diff --git a/source-android/android/res/drawable-hdpi/icon.png b/source-android/android/res/drawable-hdpi/icon.png
new file mode 100644
index 0000000..7618b3a
Binary files /dev/null and b/source-android/android/res/drawable-hdpi/icon.png differ
diff --git a/source-android/android/res/drawable-ldpi/icon.png b/source-android/android/res/drawable-ldpi/icon.png
new file mode 100644
index 0000000..8e269d7
Binary files /dev/null and b/source-android/android/res/drawable-ldpi/icon.png differ
diff --git a/source-android/android/res/drawable-mdpi/icon.png b/source-android/android/res/drawable-mdpi/icon.png
new file mode 100644
index 0000000..6643513
Binary files /dev/null and b/source-android/android/res/drawable-mdpi/icon.png differ
diff --git a/source-android/android/res/values/libs.xml b/source-android/android/res/values/libs.xml
index 77f422c..6b1a4a2 100644
--- a/source-android/android/res/values/libs.xml
+++ b/source-android/android/res/values/libs.xml
@@ -1,7 +1,7 @@
- https://download.qt.io/ministro/android/qt5/qt-5.8
+ https://download.qt.io/ministro/android/qt5/qt-5.14
-
-
-
-
-
-
+
+
-
-
+
+
+
diff --git a/source-android/android/src/ExampleService.java b/source-android/android/src/ExampleService.java
deleted file mode 100644
index 217e99c..0000000
--- a/source-android/android/src/ExampleService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package androidnative.example;
-import androidnative.SystemDispatcher;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.util.Log;
-import android.os.Handler;
-import android.app.Activity;
-import android.view.View;
-import android.content.Context;
-import java.util.Map;
-import org.qtproject.qt5.android.QtNative;
-
-public class ExampleService {
-
- static {
-
- SystemDispatcher.addListener(new SystemDispatcher.Listener() {
-
- NotificationManager m_notificationManager;
- Notification.Builder m_builder;
-
- private void notificationManagerNotify(Map data) {
-
- final Activity activity = QtNative.activity();
- final Map messageData = data;
-
- Runnable runnable = new Runnable () {
- public void run() {
- try {
- String title = (String) messageData.get("title");
-
- String message = (String) messageData.get("message");
-
- if (m_notificationManager == null) {
- m_notificationManager = (NotificationManager) activity.getSystemService(Context.NOTIFICATION_SERVICE);
- m_builder = new Notification.Builder(activity);
-
- // Small Icon is a must to make notification works.
- // And that is why you need to inherit QtActivity
- //m_builder.setSmallIcon(drawable.icon);
- }
-
- m_builder.setContentTitle(title);
- m_builder.setContentText(message);
- m_notificationManager.notify(1, m_builder.build());
-
- // Test function. Remove it later.
- SystemDispatcher.dispatch("Notifier.notifyFinished");
- } catch (Exception e) {
- Log.d("",e.getMessage());
- }
-
- };
- };
- activity.runOnUiThread(runnable);
- }
-
- private void hapticFeedbackPerform(Map data) {
-
- final Activity activity = QtNative.activity();
- final Map messageData = data;
- Runnable runnable = new Runnable () {
- public void run() {
- int feedbackConstant = (Integer) messageData.get("feedbackConstant");
- int flags = (Integer) messageData.get("flags");
-
- Log.d("",String.format("hapticFeedbackPerform(%d,%d)",feedbackConstant,flags));
-
- View rootView = activity.getWindow().getDecorView().getRootView();
- rootView.performHapticFeedback(feedbackConstant, flags);
-
- // Test function. Remove it later.
- SystemDispatcher.dispatch("hapticFeedbackPerformFinished");
- };
- };
- activity.runOnUiThread(runnable);
- }
-
- public void onDispatched(String name , Map data) {
-
- if (name.equals("Notifier.notify")) {
- notificationManagerNotify(data);
- return;
- } else if (name.equals("hapticFeedbackPerform")) {
- hapticFeedbackPerform(data);
- return;
- }
-
- return;
- }
- });
-
- }
-
-}
-
diff --git a/source-android/android/src/FriendiqaService.java b/source-android/android/src/FriendiqaService.java
index 9115a03..4dc2dda 100644
--- a/source-android/android/src/FriendiqaService.java
+++ b/source-android/android/src/FriendiqaService.java
@@ -10,15 +10,15 @@ import org.qtproject.qt5.android.QtNative;
//import androidnative.friendiqa.FriendiqaQtService;
public class FriendiqaService extends JobService{
- private static String TAG = "AndroidNative";
+ private static String TAG = "FriendiqaService";
//Log.e(TAG,"Service");
@Override
public boolean onStartJob(JobParameters params) {
- //Log.d(TAG,"Friendiqa JobService");
+ Log.d(TAG,"Friendiqa JobService");
Context context = this.getApplicationContext();
- AndroidNativeService fs = new AndroidNativeService();
+ AndroidNativeService fs = new AndroidNativeService();
fs.startQtService(context);
jobFinished(params,false);
//Intent serviceIntent = new Intent(this, AndroidNativeService.class);
diff --git a/source-android/android/src/FriendiqaStopService.java b/source-android/android/src/FriendiqaStopService.java
index e483d62..2851bcd 100644
--- a/source-android/android/src/FriendiqaStopService.java
+++ b/source-android/android/src/FriendiqaStopService.java
@@ -16,7 +16,7 @@ public class FriendiqaStopService extends JobService{
@Override
public boolean onStartJob(JobParameters params) {
- //Log.d(TAG,"Friendiqa JobServiceStop");
+ Log.d(TAG,"Friendiqa JobServiceStop");
Context context = this.getApplicationContext();
AndroidNativeService fs = new AndroidNativeService();
fs.stopQtService(context);
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/Components.qml b/source-android/androidnative.pri/examples/androidnativeexample/Components.qml
deleted file mode 100644
index cdd7880..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/Components.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Window 2.1
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import "./theme"
-
-Page {
- objectName: "ComponentPage";
-
- property var pages: [
- {
- name: "Image Picker",
- demo: "imagePicker/ImagePickerDemo.qml",
- description: "Pick photo via Java language binding"
- },{
- name: "Toast",
- demo: "toast/ToastDemo.qml",
- description: "Toast Demonstration"
- },{
- name: "Notification",
- demo: "notification/NotificationDemo.qml",
- description: "Demonstrate how to use SystemDispatcher to send notification"
- },{
- name: "Information",
- demo: "info/InfoDemo.qml",
- description: "Android System Information"
- },{
- name: "Status Bar",
- demo: "statusbar/StatusBarDemo.qml",
- description: "Config Status Bar"
- }
-
- ];
-
- actionBar: ActionBar {
- id : actionBar
- iconSource: A.drawable("ic_menu",Constants.black87)
- title: "AndroidNative Component List"
- showIcon: false
- actionButtonEnabled: false
- }
-
- VisualDataModel {
- id: visualDataModel
- delegate: ListItem {
- title: modelData.name
- subtitle: modelData.description
- onClicked: {
- present(Qt.resolvedUrl(modelData.demo));
- }
- }
-
- model: pages;
- }
-
- ListView {
- anchors.fill: parent
-
- model : visualDataModel
- }
-
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/README.md b/source-android/androidnative.pri/examples/androidnativeexample/README.md
deleted file mode 100644
index e3a9f38..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-AndroidNative Example Program
-=====================
-
-Prerequisites
--------------
-
- * Qt Android SDK >= 5.6
- * Android SDK
-
-Check this article for how to setup Qt and Android SDK:
-
-[Getting Started with Qt for Android](http://qt-project.org/doc/qt-5/androidgs.html)
-
-Build Instruction
------------------
-
- 1. Run `qpm install` to get required packages
- 1. Open androidnativeexample.pro by Qt Creator
- 1. Press the "Projects" tab. Make sure the "Android for xxx" kit has been selected
- 1. Plug a Android device to your computer
- 1. Press "Build" -> "Run"
- 1. The program will be deployed to your device. It is so easy!
-
-
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/AndroidManifest.xml b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/AndroidManifest.xml
deleted file mode 100644
index 5ecf270..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/AndroidManifest.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/androidnative.gradle b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/androidnative.gradle
deleted file mode 100644
index 8fe9786..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/androidnative.gradle
+++ /dev/null
@@ -1,34 +0,0 @@
-
-// Obtain androidPackageSourceDir
-// androidPackageSourceDir is the absolute path of the folder containing build.gradle and AndroidManifests.xml
-// This code also works with androiddeployqt.
-
-import groovy.json.JsonSlurper
-
-String getAndroidPackageSourceDir() {
- String res = System.getProperty("user.dir");
-
- FileTree tree = fileTree(dir: res + "/..").include("android*deployment-settings.json");
-
- if (tree.getFiles().size() > 0) {
- def inputFile = tree.getFiles().toArray()[0];
- def InputJSON = new JsonSlurper().parseText(inputFile.text);
- res = InputJSON["android-package-source-directory"]
- } else {
- println("android*deployment-settings.json not found. Set androidPackageSourceDir to user.dir");
- }
-
- return res;
-}
-
-String setAndroidNativePath(String path) {
- String androidPackageSourceDir = getAndroidPackageSourceDir();
- String androidNativePath = androidPackageSourceDir + path + "/java/src";
- LinkedHashSet hash = android.sourceSets.main.java.srcDirs;
- hash.add(androidNativePath);
- android.sourceSets.main.java.srcDirs = hash;
-}
-
-ext {
- setAndroidNativePath = this.&setAndroidNativePath;
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/build.gradle b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/build.gradle
deleted file mode 100644
index 4ce7902..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/build.gradle
+++ /dev/null
@@ -1,60 +0,0 @@
-
-buildscript {
- repositories {
- jcenter()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:1.3.0'
- }
-}
-
-allprojects {
- repositories {
- jcenter()
- }
-}
-
-apply plugin: 'com.android.application'
-
-dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
-}
-
-android {
- /*******************************************************
- * The following variables:
- * - androidBuildToolsVersion,
- * - androidCompileSdkVersion
- * - qt5AndroidDir - holds the path to qt android files
- * needed to build any Qt application
- * on Android.
- *
- * are defined in gradle.properties file. This file is
- * updated by QtCreator and androiddeployqt tools.
- * Changing them manually might break the compilation!
- *******************************************************/
-
- compileSdkVersion androidCompileSdkVersion.toInteger()
-
- buildToolsVersion androidBuildToolsVersion
-
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
- aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
- res.srcDirs = [qt5AndroidDir + '/res', 'res']
- resources.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- assets.srcDirs = ['assets']
- jniLibs.srcDirs = ['libs']
- }
- }
- lintOptions {
- abortOnError false
- }
-}
-
-apply from: "androidnative.gradle"
-setAndroidNativePath("/../../..");
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle.properties b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle.properties
deleted file mode 100644
index 798b77d..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-## This file is automatically generated by QtCreator.
-#
-# This file must *NOT* be checked into Version Control Systems,
-# as it contains information specific to your local configuration.
-
-androidBuildToolsVersion=25.0.3
-androidCompileSdkVersion=25
-buildDir=.build
-qt5AndroidDir=/home/pankraz/Qt/5.9.1/android_armv7/src/android/java
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle/wrapper/gradle-wrapper.jar b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 13372ae..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle/wrapper/gradle-wrapper.properties b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 9f2bca4..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Thu Feb 16 01:04:18 HKT 2017
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradlew b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradlew
deleted file mode 100644
index 9d82f78..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradlew.bat b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/local.properties b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/local.properties
deleted file mode 100644
index 4277a61..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/local.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-## This file is automatically generated by QtCreator.
-#
-# This file must *NOT* be checked into Version Control Systems,
-# as it contains information specific to your local configuration.
-
-sdk.dir=/home/pankraz/android-sdk_alt
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/drawable/icon.png b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/drawable/icon.png
deleted file mode 100644
index 156243d..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/drawable/icon.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/drawable/splash.xml b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/drawable/splash.xml
deleted file mode 100644
index c1bd6fc..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/drawable/splash.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/values/apptheme.xml b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/values/apptheme.xml
deleted file mode 100644
index 455b965..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/values/apptheme.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/values/libs.xml b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/values/libs.xml
deleted file mode 100644
index 4d68673..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/res/values/libs.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- https://download.qt-project.org/ministro/android/qt5/qt-5.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/src/ExampleActivity.java b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/src/ExampleActivity.java
deleted file mode 100644
index ffa8952..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/src/ExampleActivity.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package androidnative.example;
-
-import androidnative.AndroidNativeActivity;
-
-/**
- * Created by benlau on 8/3/2017.
- */
-
-public class ExampleActivity extends AndroidNativeActivity {
- public ExampleActivity() {
- super();
-
- QT_ANDROID_THEMES = new String[] {""};
- QT_ANDROID_DEFAULT_THEME = "";
- }
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/src/ExampleService.java b/source-android/androidnative.pri/examples/androidnativeexample/android-sources/src/ExampleService.java
deleted file mode 100644
index 082ff10..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/android-sources/src/ExampleService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package androidnative.example;
-import androidnative.SystemDispatcher;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.util.Log;
-import android.os.Handler;
-import android.app.Activity;
-import android.view.View;
-import android.content.Context;
-import java.util.Map;
-import org.qtproject.qt5.android.QtNative;
-
-public class ExampleService {
-
- static {
-
- SystemDispatcher.addListener(new SystemDispatcher.Listener() {
-
- NotificationManager m_notificationManager;
- Notification.Builder m_builder;
-
- private void notificationManagerNotify(Map data) {
-
- final Activity activity = QtNative.activity();
- final Map messageData = data;
-
- Runnable runnable = new Runnable () {
- public void run() {
- try {
- String title = (String) messageData.get("title");
-
- String message = (String) messageData.get("message");
-
- if (m_notificationManager == null) {
- m_notificationManager = (NotificationManager) activity.getSystemService(Context.NOTIFICATION_SERVICE);
- m_builder = new Notification.Builder(activity);
-
- // Small Icon is a must to make notification works.
- // And that is why you need to inherit QtActivity
- m_builder.setSmallIcon(R.drawable.icon);
- }
-
- m_builder.setContentTitle(title);
- m_builder.setContentText(message);
- m_notificationManager.notify(1, m_builder.build());
-
- // Test function. Remove it later.
- SystemDispatcher.dispatch("Notifier.notifyFinished");
- } catch (Exception e) {
- Log.d("",e.getMessage());
- }
-
- };
- };
- activity.runOnUiThread(runnable);
- }
-
- private void hapticFeedbackPerform(Map data) {
-
- final Activity activity = QtNative.activity();
- final Map messageData = data;
- Runnable runnable = new Runnable () {
- public void run() {
- int feedbackConstant = (Integer) messageData.get("feedbackConstant");
- int flags = (Integer) messageData.get("flags");
-
- Log.d("",String.format("hapticFeedbackPerform(%d,%d)",feedbackConstant,flags));
-
- View rootView = activity.getWindow().getDecorView().getRootView();
- rootView.performHapticFeedback(feedbackConstant, flags);
-
- // Test function. Remove it later.
- SystemDispatcher.dispatch("hapticFeedbackPerformFinished");
- };
- };
- activity.runOnUiThread(runnable);
- }
-
- public void onDispatched(String name , Map data) {
-
- if (name.equals("Notifier.notify")) {
- notificationManagerNotify(data);
- return;
- } else if (name.equals("hapticFeedbackPerform")) {
- hapticFeedbackPerform(data);
- return;
- }
-
- return;
- }
- });
-
- }
-
-}
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro b/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro
deleted file mode 100644
index cec26e5..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro
+++ /dev/null
@@ -1,38 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-
-SOURCES += main.cpp \
- debugwrapper.cpp
-
-RESOURCES += qml.qrc
-
-# Additional import path used to resolve QML modules in Qt Creator's code model
-QML_IMPORT_PATH += ../..
-
-android {
- ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
-}
-
-# include(vendor/vendor.pri)
-# Default rules for deployment.
-include(deployment.pri)
-include(../../androidnative.pri)
-include(../../../../../../quickandroid/quickandroid.pri)
-
-DISTFILES += \
- android-sources/AndroidManifest.xml \
- android-sources/src/quickandroid/example/ExampleService.java \
- README.md \
- android-sources/gradle/wrapper/gradle-wrapper.jar \
- android-sources/gradlew \
- android-sources/res/values/libs.xml \
- android-sources/build.gradle \
- android-sources/gradle/wrapper/gradle-wrapper.properties \
- android-sources/gradlew.bat \
- android-sources/settings.gradle \
- android-sources/src/androidnative/example/ExampleService.java
-
-HEADERS += \
- ../../README.md \
- debugwrapper.h
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro.user b/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro.user
deleted file mode 100644
index 1693b53..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro.user
+++ /dev/null
@@ -1,392 +0,0 @@
-
-
-
-
-
- EnvironmentId
- {8825bc46-5cad-4a59-be78-bf9eeaa7217a}
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 80
- true
- true
- 1
- true
- false
- 0
- true
- true
- 0
- 8
- true
- 1
- true
- true
- true
- false
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
-
- ProjectExplorer.Project.Target.0
-
- Android
- Android
- {8e3757e7-5698-4d0f-9f13-55359b1a832e}
- 0
- 0
- 0
-
- /home/pankraz/build/debug
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- true
-
- false
- false
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
-
- true
- Anwendungsdaten kopieren
-
- Qt4ProjectManager.AndroidPackageInstallationStep
-
-
- android-25
-
- true
- Android-APK erstellen
-
- QmakeProjectManager.AndroidBuildApkStep
- 2
- true
- false
-
- 4
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Debug
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
- true
-
-
- /home/pankraz/ownCloud/clientsync/Friendiqa/v0.005/source-android/androidnative.pri/examples/build-androidnativeexample-Android-Release
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
-
- false
- false
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
-
- true
- Anwendungsdaten kopieren
-
- Qt4ProjectManager.AndroidPackageInstallationStep
-
-
- android-25
-
- true
- Android-APK erstellen
-
- QmakeProjectManager.AndroidBuildApkStep
- 2
- true
- false
-
- 4
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Release
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- true
-
-
- /home/pankraz/ownCloud/clientsync/Friendiqa/v0.005/source-android/androidnative.pri/examples/build-androidnativeexample-Android-Profile
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- true
-
- false
- true
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
-
- true
- Anwendungsdaten kopieren
-
- Qt4ProjectManager.AndroidPackageInstallationStep
-
-
- android-25
-
- true
- Android-APK erstellen
-
- QmakeProjectManager.AndroidBuildApkStep
- 2
- true
- false
-
- 4
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Profile
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- true
-
- 3
-
-
-
- true
- Deployment auf Android-Gerät
-
- Qt4ProjectManager.AndroidDeployQtStep
- false
-
- 1
- Deployment
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Deployment auf Android-Gerät
- Deployment auf Android-Gerät
- Qt4ProjectManager.AndroidDeployConfiguration2
-
- 1
-
- CB5A22HSB9
-
-
- false
- false
- 1000
-
- true
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- 1
- 25
-
- 1
- true
- false
- true
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
-
-
-
- androidnativeexample
-
- Qt4ProjectManager.AndroidRunConfiguration:/home/pankraz/ownCloud/clientsync/Friendiqa/v0.005/source-android/androidnative.pri/examples/androidnativeexample/androidnativeexample.pro
- androidnativeexample.pro
- 3768
- false
- true
- false
- false
- true
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 1
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 18
-
-
- Version
- 18
-
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/debugwrapper.cpp b/source-android/androidnative.pri/examples/androidnativeexample/debugwrapper.cpp
deleted file mode 100644
index 8aaf024..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/debugwrapper.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "debugwrapper.h"
-#include "AndroidNative/debug.h"
-
-DebugWrapper::DebugWrapper(QObject *parent) : QObject(parent)
-{
-
-}
-
-long DebugWrapper::getNativeHeapSize() const
-{
- return AndroidNative::Debug::getNativeHeapSize();
-}
-
-long DebugWrapper::getNativeHeapAllocatedSize() const
-{
- return AndroidNative::Debug::getNativeHeapAllocatedSize();
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/debugwrapper.h b/source-android/androidnative.pri/examples/androidnativeexample/debugwrapper.h
deleted file mode 100644
index 80c3424..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/debugwrapper.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef DEBUGWRAPPER_H
-#define DEBUGWRAPPER_H
-
-#include
-
-class DebugWrapper : public QObject
-{
- Q_OBJECT
-public:
- explicit DebugWrapper(QObject *parent = 0);
-
-signals:
-
-public slots:
- long getNativeHeapSize() const;
-
- long getNativeHeapAllocatedSize() const;
-};
-
-#endif // DEBUGWRAPPER_H
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/deployment.pri b/source-android/androidnative.pri/examples/androidnativeexample/deployment.pri
deleted file mode 100644
index 5441b63..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/deployment.pri
+++ /dev/null
@@ -1,27 +0,0 @@
-android-no-sdk {
- target.path = /data/user/qt
- export(target.path)
- INSTALLS += target
-} else:android {
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
- export(target.path)
- INSTALLS += target
-} else:unix {
- isEmpty(target.path) {
- qnx {
- target.path = /tmp/$${TARGET}/bin
- } else {
- target.path = /opt/$${TARGET}/bin
- }
- export(target.path)
- }
- INSTALLS += target
-}
-
-export(INSTALLS)
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/dialog/DialogDemo.qml b/source-android/androidnative.pri/examples/androidnativeexample/dialog/DialogDemo.qml
deleted file mode 100644
index 8ee22be..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/dialog/DialogDemo.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import QtQuick 2.0
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import "../theme"
-
-Page {
- actionBar: ActionBar {
- id: actionBar
- upEnabled: true
- title: qsTr("Dialog Demo")
- showTitle: true
-
- onActionButtonClicked: back();
- z: 10
-
- }
-
- Button {
- id: label
- text : "Press to launch dialog"
- anchors.centerIn: parent
- onClicked: {
- dialog.open();
- }
- }
-
- Dialog {
- id: dialog
- anchors.centerIn: parent
- title: "Dialog"
- Text {
- text: "Demo"
- }
- z: 20
-
- acceptButtonText: "OK"
- }
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/imagePicker/ImagePickerDemo.qml b/source-android/androidnative.pri/examples/androidnativeexample/imagePicker/ImagePickerDemo.qml
deleted file mode 100644
index e38c7a3..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/imagePicker/ImagePickerDemo.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-import QtQuick 2.0
-import QuickAndroid 0.1
-import AndroidNative 1.0 as AN
-import "../theme"
-
-Page {
- id: demo
- actionBar: ActionBar {
- title: "Image Picker Demo"
- onActionButtonClicked: back();
- }
-
- AN.ImagePicker {
- id: imagePicker;
- multiple : true
- }
-
- Rectangle {
- anchors.fill: parent
- color: Constants.black100
-
- Image {
- id: image
- anchors.fill: parent
- source: imagePicker.imageUrl
- fillMode: Image.PreserveAspectFit
- visible: imagePicker.imageUrls.length <= 1
- }
-
- Grid {
- columns: 3
- spacing: 0
- visible: !image.visible
-
- Repeater {
- model: imagePicker.imageUrls
- delegate: Image {
- width: demo.width / 3
- height: width / 4 * 3
- source: modelData
- asynchronous: true
- fillMode: Image.PreserveAspectCrop
- }
- }
- }
-
- Column {
- anchors.right: parent.right
- anchors.rightMargin: 16 * A.dp
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 32 * A.dp
-
- spacing: 16 * A.dp
-
- FloatingActionButton {
- iconSource: A.drawable("ic_camera",Constants.black87);
- size: Constants.small
- backgroundColor: Constants.white100
- onClicked: {
- imagePicker.takePhoto();
- }
- }
-
- FloatingActionButton {
- iconSource: A.drawable("ic_image",Constants.black87);
- size: Constants.small
- backgroundColor: Constants.white100
- onClicked: {
- imagePicker.pickImage();
- }
- }
-
- }
-
- }
-}
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/info/InfoDemo.qml b/source-android/androidnative.pri/examples/androidnativeexample/info/InfoDemo.qml
deleted file mode 100644
index d86a319..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/info/InfoDemo.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-import QtQuick 2.0
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import "../theme"
-
-Page {
- id: page
- actionBar: ActionBar {
- id: actionBar
- upEnabled: true
- title: qsTr("Information")
- showTitle: true
-
- onActionButtonClicked: back();
- z: 10
- }
-
- VisualItemModel {
- id: itemModel
-
- ListItem {
- title: "Environment.DIRECTORY_DCIM"
- subtitle: Environment.DIRECTORY_DCIM
- interactive: false
- width: page.width
- }
-
- ListItem {
- title: "Debug.getNativeHeapSize"
- subtitle: (Debug.getNativeHeapSize() / 1024 / 1024).toFixed(2) + "MB";
- interactive: false
- width: page.width
- }
-
- ListItem {
- title: "Debug.getNativeHeapAllocatedSize"
- subtitle: (Debug.getNativeHeapAllocatedSize() / 1024 / 1024).toFixed(2) + "MB";
- interactive: false
- width: page.width
- }
-
- ListItem {
- title: "QThread.idealThreadCount"
- subtitle: Misc.idealThreadCount;
- interactive: false
- width: page.width
- }
- }
-
-
- ListView {
- anchors.fill: parent
- model: itemModel
- }
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/main.cpp b/source-android/androidnative.pri/examples/androidnativeexample/main.cpp
deleted file mode 100644
index 062572b..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/main.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-//#include "qadrawableprovider.h"
-#include "AndroidNative/systemdispatcher.h"
-#include "AndroidNative/environment.h"
-#include "AndroidNative/debug.h"
-#include "AndroidNative/mediascannerconnection.h"
-#include "debugwrapper.h"
-
-using namespace AndroidNative;
-
-#ifdef Q_OS_ANDROID
-#include
-#include
-
-JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
- Q_UNUSED(vm);
- qDebug("NativeInterface::JNI_OnLoad()");
-
- // It must call this function within JNI_OnLoad to enable System Dispatcher
- SystemDispatcher::registerNatives();
- return JNI_VERSION_1_6;
-}
-#endif
-
-int main(int argc, char *argv[])
-{
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
- QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-#endif
-
- QGuiApplication app(argc, argv);
- app.setApplicationName("Android Native Example");
- app.setOrganizationDomain("com.github.benlau.androidnative");
-
- QSettings settings;
-
- settings.setValue("firstTimeLoading", false);
- settings.sync();
-
- QVariantMap env;
- env["DIRECTORY_DCIM"] = Environment::getExternalStoragePublicDirectory(Environment::DIRECTORY_DCIM);
-
- QVariantMap misc;
- misc["idealThreadCount"] = QThread::idealThreadCount();
-
- MediaScannerConnection::scanFile("");
-
- SystemDispatcher::instance()->loadClass("androidnative.example.ExampleService");
-
- QQmlApplicationEngine engine;
-
- /* QuickAndroid Initialization */
- engine.addImportPath("qrc:///"); // Add QuickAndroid into the import path
- engine.rootContext()->setContextProperty("Environment", env);
- engine.rootContext()->setContextProperty("Misc", misc);
- engine.rootContext()->setContextProperty("Debug", new DebugWrapper(&engine));
-
- /* End of QuickAndroid Initialization */
-
- // Extra features:
- //QADrawableProvider* provider = new QADrawableProvider();
- //provider->setBasePath("qrc://res");
- //engine.addImageProvider("drawable",provider);
- engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
-
- return app.exec();
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/main.qml b/source-android/androidnative.pri/examples/androidnativeexample/main.qml
deleted file mode 100644
index 9a08956..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/main.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Window 2.2
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import "./theme"
-
-Window {
- id: window;
- width: 480
- height: 640
-
- color: "#FFFFFF"
-
- visible: false;
-
- /* Fast Splash Screen Setup Instruction
-
- 1. Create a custom theme (apptheme.qml) and set windowBackground to @drawable/splash.xml (Your splash screen drawable)
-
- 2. Within AndroidManifest.xml, set android.app.splash_screen_drawable to @drawable/splash.xml
-
-
-
-
-
- That will show a splash screen while Qt is loading. However, screen flicker will happen when your Window
- item is shown. To prevent screen flicker completely, you could setup your main.qml accoroding to step 3.
-
- 3. In your main.qml (the one with Window component)
-
- 3.1. Set Window.color to a color which is similar to splash screen / Theme.windowBackground
-
- 3.2. Set visible of Window to false until your content is loaded. (Keep Android splash screen while loading)
-
- 3.3. Use an asynchronous Loader for your content. Set opacity to 0.
-
- 3.4. Once everything is ready, set Window.visible to true and perform a fade-in animation on Loader
-
- */
-
- Loader {
- id: loader
- parent: null
- width: window.width
- height: window.height
- asynchronous: true
- opacity: 0
- focus: true;
-
- sourceComponent: PageStack {
- id: stack
- objectName: "PageStack";
- initialPage: Components {
-
- onPresented: {
- window.visible = true;
- A.setTimeout(function() {
- loader.parent = window.contentItem;
- loader.opacity = 1;
- }, 34);
- }
- }
- }
-
- Behavior on opacity {
- NumberAnimation {
- duration: 200
- easing.type: Easing.OutQuad;
- }
- }
- }
-
- Component.onCompleted: {
- ThemeManager.currentTheme = AppTheme
- }
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/notification/NotificationDemo.qml b/source-android/androidnative.pri/examples/androidnativeexample/notification/NotificationDemo.qml
deleted file mode 100644
index 174a5a0..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/notification/NotificationDemo.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Window 2.1
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import AndroidNative 1.0 as AN
-import "../theme"
-
-Page {
-
- actionBar: ActionBar {
- id : actionBar
- title: "Notification"
- z: 10
- upEnabled: true
- onActionButtonClicked: back();
- }
-
- Button {
- id: label
- text : "Press to send notification"
- anchors.centerIn: parent
- onClicked: {
- AN.SystemDispatcher.dispatch("Notifier.notify",{
- title: "Quick Android Example",
- message: "Hello!"
- });
- }
- }
-
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/qml.qrc b/source-android/androidnative.pri/examples/androidnativeexample/qml.qrc
deleted file mode 100644
index 225e836..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/qml.qrc
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
- main.qml
- res/drawable-hdpi/icon.png
- Components.qml
- res/drawable-xxhdpi/ic_menu.png
- dialog/DialogDemo.qml
- notification/NotificationDemo.qml
- theme/AppTheme.qml
- theme/qmldir
- res/drawable-hdpi/ic_android_black_48dp.png
- res/drawable-xxhdpi/ic_android_black_48dp.png
- res/drawable-mdpi/ic_android_black_48dp.png
- res/drawable-xhdpi/ic_android_black_48dp.png
- res/drawable-xxxhdpi/ic_android_black_48dp.png
- res/drawable-hdpi/ic_done_black_24dp.png
- res/drawable-mdpi/ic_done_black_24dp.png
- res/drawable-xhdpi/ic_done_black_24dp.png
- res/drawable-xxhdpi/ic_done_black_24dp.png
- res/drawable-xxxhdpi/ic_done_black_24dp.png
- theme/ActionBarBackground.qml
- res/drawable-xxhdpi/ic_keyboard_backspace.png
- res/drawable-xxhdpi/ic_arrow_back.png
- res/drawable-xxhdpi/ic_image.png
- res/drawable-xxhdpi/ic_camera.png
- imagePicker/ImagePickerDemo.qml
- info/InfoDemo.qml
- toast/ToastDemo.qml
- statusbar/StatusBarDemo.qml
-
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/qpm.json b/source-android/androidnative.pri/examples/androidnativeexample/qpm.json
deleted file mode 100644
index 9ff04fd..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/qpm.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "",
- "description": "",
- "dependencies": [
- "com.github.benlau.quickandroid@0.1.7"
- ],
- "license": "NONE",
- "pri_filename": "",
- "webpage": ""
-}
\ No newline at end of file
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/ic_android_black_48dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/ic_android_black_48dp.png
deleted file mode 100644
index 6006b12..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/ic_android_black_48dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/ic_done_black_24dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/ic_done_black_24dp.png
deleted file mode 100644
index d4c0607..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/ic_done_black_24dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/icon.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/icon.png
deleted file mode 100644
index 156243d..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-hdpi/icon.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-mdpi/ic_android_black_48dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-mdpi/ic_android_black_48dp.png
deleted file mode 100644
index 41558f2..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-mdpi/ic_android_black_48dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-mdpi/ic_done_black_24dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-mdpi/ic_done_black_24dp.png
deleted file mode 100644
index 5e5e7cf..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-mdpi/ic_done_black_24dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xhdpi/ic_android_black_48dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xhdpi/ic_android_black_48dp.png
deleted file mode 100644
index 4f935bf..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xhdpi/ic_android_black_48dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xhdpi/ic_done_black_24dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xhdpi/ic_done_black_24dp.png
deleted file mode 100644
index 64a4944..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xhdpi/ic_done_black_24dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_android_black_48dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_android_black_48dp.png
deleted file mode 100644
index 149b4ec..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_android_black_48dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_arrow_back.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_arrow_back.png
deleted file mode 100644
index 1e88d35..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_arrow_back.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_camera.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_camera.png
deleted file mode 100644
index 91f103d..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_camera.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_done_black_24dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_done_black_24dp.png
deleted file mode 100644
index c9c0174..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_done_black_24dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_image.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_image.png
deleted file mode 100644
index b32faff..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_image.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_keyboard_backspace.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_keyboard_backspace.png
deleted file mode 100644
index a49c20c..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_keyboard_backspace.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_menu.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_menu.png
deleted file mode 100644
index ab83be5..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxhdpi/ic_menu.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxxhdpi/ic_android_black_48dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxxhdpi/ic_android_black_48dp.png
deleted file mode 100644
index ded531f..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxxhdpi/ic_android_black_48dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxxhdpi/ic_done_black_24dp.png b/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxxhdpi/ic_done_black_24dp.png
deleted file mode 100644
index 2f6d638..0000000
Binary files a/source-android/androidnative.pri/examples/androidnativeexample/res/drawable-xxxhdpi/ic_done_black_24dp.png and /dev/null differ
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/statusbar/StatusBarDemo.qml b/source-android/androidnative.pri/examples/androidnativeexample/statusbar/StatusBarDemo.qml
deleted file mode 100644
index 0d82d01..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/statusbar/StatusBarDemo.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Window 2.1
-import QtQuick.Controls 2.1 as QQC2
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import AndroidNative 1.0 as AN
-import "../theme"
-
-Page {
-
- actionBar: ActionBar {
- id : actionBar
- title: "Status Bar"
- z: 10
- upEnabled: true
- onActionButtonClicked: back();
- }
-
- Column {
- anchors.centerIn: parent
-
- QQC2.Switch {
- text: "Translucent Status Bar"
- checked: false
-
- onCheckedChanged: {
- AN.SystemDispatcher.dispatch("androidnative.Util.setTranslucentStatusBar", {value: checked});
- }
- }
-
- QQC2.Switch {
- text: "Status Bar Visible"
- checked: true
-
- onCheckedChanged: {
- AN.SystemDispatcher.dispatch("androidnative.Util.setFullScreen", {value: checked});
- }
- }
-
- }
-
- Component.onCompleted: {
- AN.SystemDispatcher.loadClass("androidnative.Util");
- }
-
-
-}
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/theme/ActionBarBackground.qml b/source-android/androidnative.pri/examples/androidnativeexample/theme/ActionBarBackground.qml
deleted file mode 100644
index 1adb0f1..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/theme/ActionBarBackground.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-import QtQuick 2.0
-import QuickAndroid 0.1
-
-Item {
-
- MaterialShadow {
- asynchronous: true
- anchors.fill: parent
- depth: 1
- }
-
- Rectangle {
- color: "#cddc39" // Lime 500
- anchors.fill: parent
- }
-}
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/theme/AppTheme.qml b/source-android/androidnative.pri/examples/androidnativeexample/theme/AppTheme.qml
deleted file mode 100644
index 9ee92c2..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/theme/AppTheme.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-import QtQuick 2.0
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-pragma Singleton
-
-Theme {
- mediumText.textSize: 18 * A.dp
- smallText.textSize : 14 * A.dp
-
- colorPrimary: "#cddc39" // Lime 500
- textColorPrimary: Constants.black87
- windowBackground: "#eeeeee";
-
- // The default icon of ActionBar is a "back" image
- actionBar.iconSource: A.drawable("ic_arrow_back",Constants.black87)
-
- // Background with shadow
- actionBar.background: ActionBarBackground {
- }
-
- // actionBar.title.textSize is not allowed in QML. You should declare your own TextMaterial and assign directly.
- // or modify text , smallText , mediumText and largetText
- actionBar.title : customTextMaterial1;
- actionBar.iconSourceSize: Qt.size(24 * A.dp , 24 * A.dp)
-
- // Custom Style object.
- TextMaterial {
- id : customTextMaterial1
- textSize: 18 * A.dp
- textColor : Constants.black87
- }
-}
-
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/theme/qmldir b/source-android/androidnative.pri/examples/androidnativeexample/theme/qmldir
deleted file mode 100644
index 5a1f2f4..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/theme/qmldir
+++ /dev/null
@@ -1,2 +0,0 @@
-module theme
-singleton AppTheme 0.1 AppTheme.qml
diff --git a/source-android/androidnative.pri/examples/androidnativeexample/toast/ToastDemo.qml b/source-android/androidnative.pri/examples/androidnativeexample/toast/ToastDemo.qml
deleted file mode 100644
index f5e23bd..0000000
--- a/source-android/androidnative.pri/examples/androidnativeexample/toast/ToastDemo.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Window 2.1
-import QuickAndroid 0.1
-import QuickAndroid.Styles 0.1
-import AndroidNative 1.0 as AN
-import "../theme"
-
-Page {
-
- actionBar: ActionBar {
- id : actionBar
- title: "Toast"
- z: 10
- upEnabled: true
- onActionButtonClicked: back();
- }
-
- AN.Toast {
- id: toast
- text: "Toast"
- longDuration: true
- }
-
- Button {
- id: label
- text : "Press to show toast"
- anchors.centerIn: parent
- onClicked: {
- toast.show();
- }
- }
-
-}
diff --git a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java
index 5832b90..01833c2 100644
--- a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java
+++ b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java
@@ -4,11 +4,13 @@ import android.util.Log;
import android.app.Activity;
import android.os.*;
import java.util.Map;
+import java.util.HashMap;
import android.content.pm.PackageManager;
import android.content.Context;
import android.Manifest.permission;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+import androidnative.AndroidNativeService;
/** An alternative Activity class for Qt applicaiton.
@@ -16,8 +18,9 @@ import android.support.v4.content.ContextCompat;
*/
public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.QtActivity {
- public static final int MY_PERMISSIONS_REQUEST_WRITE_STORAGE = 0x245285a8;
-
+ public static final int MY_PERMISSIONS_REQUEST_READ_STORAGE = 0x245285a8;
+ public static final int MY_PERMISSIONS_REQUEST_POST_NOTIFICATIONS = 0x245285a9;
+ private static final String TAG = "AndroidNativeActivity";
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
@@ -28,21 +31,28 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
protected void onResume() {
super.onResume();
- if (ContextCompat.checkSelfPermission(this,android.Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) {
+
+
+
+ AndroidNativeService fs = new AndroidNativeService();
+ fs.startQtService(this);
+ //if (ContextCompat.checkSelfPermission(this,android.Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) {
// Permission is not granted
- ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_WRITE_STORAGE);
+ // ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_WRITE_STORAGE);
// MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
// app-defined int constant. The callback method gets the
// result of the request.
- } else {
+ //} else {
- System.loadLibrary("friendiqa");
+ System.loadLibrary("friendiqa_arm64-v8a");
+ //System.loadLibrary("friendiqa_armeabi-v7a");
if((getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_NEW_TASK) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) || (getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED))) {
SystemDispatcher.onActivityResume();
} else {
+
Intent data = getIntent();
if ((data!=null) && (data.getType() != null) && !(data.getBooleanExtra("used",false))){
String type = data.getType();
@@ -65,29 +75,42 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
} else {
SystemDispatcher.onActivityResume();
}}
- }
+ //}
}
@Override public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults) {
+ Log.d(TAG,"onRequestPermissionsResult");
switch (requestCode) {
- case MY_PERMISSIONS_REQUEST_WRITE_STORAGE: {
+ case MY_PERMISSIONS_REQUEST_READ_STORAGE: {
// If request is cancelled, the result arrays are empty.
- if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
- SystemDispatcher.onActivityResume();
- } else {
+ if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ Map message = new HashMap();
+ message.put("multiple",false);
+ SystemDispatcher.dispatch("androidnative.ImagePicker.pickImage",message);
+ } else {
+ }
}
+ case MY_PERMISSIONS_REQUEST_POST_NOTIFICATIONS: {
+ // If request is cancelled, the result arrays are empty.
+ if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ Map message = new HashMap();
+ message.put("multiple",false);
+ SystemDispatcher.dispatch("androidnative.Util.setPostNotification",message);
+ } else {
+ }
+ }
return;
}
}
-}
protected void onNewIntent(Intent data) {
- System.loadLibrary("friendiqa");
+ System.loadLibrary("friendiqa_arm64-v8a");
+ //System.loadLibrary("friendiqa_armeabi-v7a");
super.onNewIntent(data);
if ((data!=null) && (data.getType() != null) && !(data.getBooleanExtra("used",false))){
String type = data.getType();
diff --git a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java
index ef0d8bf..eeca21e 100644
--- a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java
+++ b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java
@@ -1,23 +1,70 @@
package androidnative;
+import android.os.Build;
import android.content.Context;
import android.content.Intent;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.app.NotificationChannel;
+import android.app.NotificationManager;
import android.util.Log;
+import android.app.Notification.Builder;
+import android.app.Notification;
+import android.app.job.JobScheduler;
import org.qtproject.qt5.android.bindings.QtService;
+import org.qtproject.qt5.android.QtNative;
+import org.qtproject.friendiqa.R;
+import androidnative.friendiqa.FriendiqaActivity;
public class AndroidNativeService extends QtService
{
private static String TAG = "AndroidNative";
public void startQtService(Context ctx) {
- Log.d(TAG,"Friendiqa QtService");
- ctx.startService(new Intent(ctx, AndroidNativeService.class));
+ Log.d(TAG, "QtActivity active "+String.valueOf(QtNative.activity()!=null));
+ if (QtNative.activity()==null){
+ Log.d(TAG,"Friendiqasync Stop existing QtService");
+ ctx.stopService(new Intent(ctx, AndroidNativeService.class));
+
+ }
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ Log.d(TAG,"Friendiqasync startForegroundService");
+ ctx.startForegroundService(new Intent(ctx, AndroidNativeService.class));
+ } else {
+ ctx.startService(new Intent(ctx, AndroidNativeService.class));
+ }
}
public static void stopQtService(Context ctx) {
- Log.d(TAG,"Friendiqa QtServiceStop");
-
+ Log.d(TAG,"Friendiqasync QtServiceStop");
ctx.stopService(new Intent(ctx, AndroidNativeService.class));
}
-
+ @Override
+ public void onCreate()
+ {
+ Context context;
+ context = this.getApplicationContext();
+ Log.d(TAG,"Friendiqa onCreate");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+
+ Intent intent = new Intent(context,FriendiqaActivity.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+ PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
+ String CHANNEL_ID = "channel_02";
+ NotificationChannel channel = new NotificationChannel(CHANNEL_ID,
+ "Sync Channel",
+ NotificationManager.IMPORTANCE_DEFAULT);
+ channel.setSound(null,null);
+ ((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).createNotificationChannel(channel);
+ Log.d(TAG,"Friendiqa onCreate Notification");
+ Notification notification = new Notification.Builder(context,CHANNEL_ID)
+ .setSmallIcon(R.drawable.friendiqanotification)
+ .setContentTitle("Friendiqa")
+ .setContentText("Background Sync")
+ .setContentIntent(pendingIntent).build();
+ startForeground(1, notification);}
+ JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ jobScheduler.cancel(1);
+ super.onCreate();
+ }
}
diff --git a/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java b/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java
index 0b4737d..9b9b0e5 100644
--- a/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java
+++ b/source-android/androidnative.pri/java/src/androidnative/ImagePicker.java
@@ -1,6 +1,7 @@
package androidnative;
import org.qtproject.qt5.android.QtNative;
import android.content.Intent;
+import android.content.Context;
import android.util.Log;
import android.app.Activity;
import java.util.Map;
@@ -17,12 +18,20 @@ import android.content.ClipData;
import java.util.List;
import java.util.ArrayList;
+import android.content.pm.PackageManager;
+import android.content.Context;
+import android.Manifest.permission;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+
+
+
public class ImagePicker {
// Random
public static final int PICK_IMAGE_ACTION = 0x245285a3;
public static final int TAKE_PHOTO_ACTION = 0x29fe8748;
-
+ public static final int MY_PERMISSIONS_REQUEST_READ_STORAGE = 0x245285a8;
public static final String PICK_IMAGE_MESSAGE = "androidnative.ImagePicker.pickImage";
public static final String TAKE_PHOTO_MESSAGE = "androidnative.ImagePicker.takePhoto";
public static final String CHOSEN_MESSAGE = "androidnative.ImagePicker.chosen";
@@ -47,8 +56,15 @@ public class ImagePicker {
}
static void pickImage(Map message) {
+ Context context;
+ context = QtNative.activity().getApplicationContext();
+ Activity activity = org.qtproject.qt5.android.QtNative.activity();
+ if (ContextCompat.checkSelfPermission(context,android.Manifest.permission.READ_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) {
+ // Permission is not granted
+ ActivityCompat.requestPermissions(activity,new String[]{android.Manifest.permission.READ_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_READ_STORAGE);
+ } else {
Boolean multiple = false;
- Activity activity = org.qtproject.qt5.android.QtNative.activity();
+ //Activity activity = org.qtproject.qt5.android.QtNative.activity();
Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
@@ -62,7 +78,8 @@ public class ImagePicker {
// >= API 18
activity.startActivityForResult(intent, PICK_IMAGE_ACTION);
- }
+
+ }}
static void takePhoto(Map message) {
if (message.containsKey("broadcast")) {
@@ -95,7 +112,6 @@ public class ImagePicker {
return;
int requestCode = (Integer) message.get("requestCode");
Intent data = (Intent) message.get("data");
-
if (requestCode == PICK_IMAGE_ACTION) {
importImage(data);
} else if (requestCode == TAKE_PHOTO_ACTION) {
@@ -110,8 +126,8 @@ public class ImagePicker {
static private void importImage(Intent data) {
Uri uri = data.getData();
- Log.d(TAG,"importImage: uri:" + uri);
- Log.d(TAG,"importImage: type: " + data.getType());
+ //Log.d(TAG,"importImage: uri:" + uri);
+ //Log.d(TAG,"importImage: type: " + data.getType());
if (data.getClipData() != null) {
importImageFromClipData(data);
diff --git a/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java b/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java
index a8f0015..616fce5 100644
--- a/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java
+++ b/source-android/androidnative.pri/java/src/androidnative/SystemDispatcher.java
@@ -140,6 +140,7 @@ public class SystemDispatcher {
waitingIntent=null;
isIntentPending=false;
} else { //onIntent start
+ Log.e(TAG,"notInitialized: onIntentStart "+data);
message.put("text",data.getStringExtra(Intent.EXTRA_TEXT));
message.put("subject",data.getStringExtra(Intent.EXTRA_SUBJECT));
waitingIntent = message;
diff --git a/source-android/androidnative.pri/java/src/androidnative/Util.java b/source-android/androidnative.pri/java/src/androidnative/Util.java
index 500da26..3d77096 100644
--- a/source-android/androidnative.pri/java/src/androidnative/Util.java
+++ b/source-android/androidnative.pri/java/src/androidnative/Util.java
@@ -11,8 +11,10 @@ import android.content.ComponentName;
import android.app.job.JobScheduler;
import android.app.job.JobInfo;
import android.app.PendingIntent;
-import android.support.v4.app.NotificationCompat;
-import android.support.v4.app.NotificationManagerCompat;
+import android.app.NotificationChannel;
+import android.app.NotificationManager;
+import androidx.core.app.NotificationCompat;
+import androidx.core.app.NotificationManagerCompat;
import org.qtproject.qt5.android.QtNative;
import androidnative.friendiqa.FriendiqaService;
import androidnative.friendiqa.FriendiqaStopService;
@@ -23,6 +25,11 @@ import android.content.Intent;
import java.util.Map;
import org.qtproject.friendiqa.R;
+import android.content.pm.PackageManager;
+import android.Manifest;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+
public class Util {
private static final String TAG = "androidnative.Util";
@@ -31,7 +38,8 @@ public class Util {
public static final String SET_FULL_SCREEN = "androidnative.Util.setFullScreen";
public static final String SET_SCHEDULE = "androidnative.Util.setSchedule";
public static final String SET_NOTIFICATION = "androidnative.Util.setNotification";
-
+ public static final String SET_POST_NOTIFICATION = "androidnative.Util.setPostNotification";
+ public static final int MY_PERMISSIONS_REQUEST_POST_NOTIFICATIONS = 0x245285a9;
static {
SystemDispatcher.addListener(new SystemDispatcher.Listener() {
@@ -44,6 +52,8 @@ public class Util {
setSchedule(message);
} else if (type.equals(SET_NOTIFICATION)) {
setNotification(message);
+ } else if (type.equals(SET_POST_NOTIFICATION)) {
+ setPostNotification(message);
}
}
});
@@ -108,41 +118,58 @@ public class Util {
}
static void setNotification(Map message) {
- //Log.d(TAG,"setNotification");
+ Log.d(TAG,"setNotification");
Context context;
//Context appcontext;
context = QtNative.service().getApplicationContext();
//appcontext = QtNative.activity().getApplicationContext();
Intent intent = new Intent(context,FriendiqaActivity.class);
//intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
- PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
+ PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
final String textTitle = (String) message.get("title");
final String textContent = (String) message.get("message");
final int notificationId = (int) message.get("id");
- NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
- .setSmallIcon(R.drawable.friendiqanotification)
- .setContentIntent(pendingIntent)
- .setContentTitle(textTitle)
- .setContentText(textContent)
- .setStyle(new NotificationCompat.BigTextStyle()
- .bigText(textContent))
-
- .setPriority(NotificationCompat.PRIORITY_DEFAULT)
- .setAutoCancel(true);
+
+ NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
- NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
- notificationManager.notify(notificationId, builder.build());
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ final String CHANNEL_ID = "channel_01";
+ NotificationChannel channel = new NotificationChannel(CHANNEL_ID,
+ "Channel for Friendiqa News",
+ NotificationManagerCompat.IMPORTANCE_LOW);
+ notificationManager.createNotificationChannel(channel);
+ NotificationCompat.Builder builder = new NotificationCompat.Builder(context,CHANNEL_ID)
+ .setSmallIcon(R.drawable.friendiqanotification)
+ .setContentIntent(pendingIntent)
+ .setContentTitle(textTitle)
+ .setContentText(textContent)
+ .setStyle(new NotificationCompat.BigTextStyle()
+ .bigText(textContent))
+ .setAutoCancel(true);
+ notificationManager.notify(notificationId, builder.build());
+
+ } else {
+ NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
+ .setSmallIcon(R.drawable.friendiqanotification)
+ .setContentIntent(pendingIntent)
+ .setContentTitle(textTitle)
+ .setContentText(textContent)
+ .setStyle(new NotificationCompat.BigTextStyle()
+ .bigText(textContent))
+
+ .setPriority(NotificationCompat.PRIORITY_DEFAULT)
+ .setAutoCancel(true);
+ notificationManager.notify(notificationId, builder.build());
+ }
}
static void setSchedule(Map message) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
- //Log.d(TAG,"Friendiqa schedule Androidnative service");
+
final Integer value = (Integer) message.get("value");
- //final Activity activity = QtNative.activity();
- //final Service service = QtNative.service();
//final int JOB_ID = 1;
final int ONE_MIN = 60 * 1000;
Context context;
@@ -152,34 +179,77 @@ public class Util {
} else {
context = QtNative.activity().getApplicationContext();
}
- ComponentName component = new ComponentName(context, FriendiqaService.class);
- JobInfo.Builder builder = new JobInfo.Builder(2, component)
- // schedule it to run any time between 1 - 5 minutes
- .setMinimumLatency(value * ONE_MIN)
- .setOverrideDeadline((value + 5)*ONE_MIN)
- //.setPeriodic(value * ONE_MIN)
- .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);
- JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
- jobScheduler.schedule(builder.build());
-
- if (QtNative.service() != null){
- //Log.d(TAG,"Schedule Stopping Friendiqa Androidnative service");
- ComponentName componentStopper = new ComponentName(context, FriendiqaStopService.class);
- JobInfo.Builder stopbuilder = new JobInfo.Builder(1, componentStopper)
- .setMinimumLatency(50)
- .setOverrideDeadline(100);
+
+
+
+ //AndroidNativeService fs = new AndroidNativeService();
+ //fs.startQtService(context);
+
+
+ if (value==0){
+ JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ jobScheduler.cancelAll();
+ Log.d(TAG,"Friendiqasync deleting Androidnative jobscheduler");
+ } else {
+ Log.d(TAG,"Friendiqasync schedule Androidnative jobscheduler");
+ ComponentName component = new ComponentName(context, FriendiqaService.class);
+ JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+
+
+ //Log.d(TAG,"Jobinfolist size " + String.valueOf(jobScheduler.getAllPendingJobs().size()));
+ if (jobScheduler.getAllPendingJobs().size()==0){
+ JobInfo.Builder builder = new JobInfo.Builder(2, component)
+ .setPeriodic(value * ONE_MIN)
+ .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
+ .setPersisted(true)
+ .setPrefetch(true);
+ Log.d(TAG,"1 Friendiqa schedule Androidnative sync schedule"+ (value * ONE_MIN));
+ jobScheduler.schedule(builder.build());
+ } else {
+ for ( JobInfo jobInfo : jobScheduler.getAllPendingJobs() ) {
+ //Log.d(TAG,"Jobinfo current interval " + String.valueOf(jobInfo.getIntervalMillis ()));
+ if (jobInfo.getIntervalMillis ()!=(value * ONE_MIN)){
+ JobInfo.Builder builder = new JobInfo.Builder(2, component)
+ .setPeriodic(value * ONE_MIN)
+ .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
+ .setPersisted(true)
+ .setPrefetch(true);
+ Log.d(TAG,"2 Friendiqa schedule Androidnative sync schedule"+ (value * ONE_MIN));
+ jobScheduler.schedule(builder.build());
+ }
+ }
+ }
+ //Log.d(TAG,"Active service " + String.valueOf(QtNative.service()!=null));
+ //if (QtNative.service() != null){
+ // Log.d(TAG,"Schedule Stopping Friendiqa Androidnative service");
+ // ComponentName componentStopper = new ComponentName(context, FriendiqaStopService.class);
+ // JobInfo.Builder stopbuilder = new JobInfo.Builder(1, componentStopper)
+ // .setMinimumLatency(50)
+ // .setOverrideDeadline(100);
- JobScheduler jobStopScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
- jobStopScheduler.schedule(stopbuilder.build());
-
-
- //AndroidNativeService.stopQtService(context);
+ // JobScheduler jobStopScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ // jobStopScheduler.schedule(stopbuilder.build());
+ //}
}
+ NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
+ notificationManager.cancelAll();
//context.stopService(new Intent(context, AndroidNativeService.class));
}
-
- /**static void stopService(Map message){
- this.stopService(new Intent(this, AndroidNativeService.class));
+
+ static void setPostNotification(Map message) {
+ Log.d(TAG,"setPostNotification");
+ Context context;
+ if (QtNative.activity() == null){
+ context = QtNative.service().getApplicationContext();
+ } else {
+ context = QtNative.activity().getApplicationContext();
+ }
+ Activity activity = org.qtproject.qt5.android.QtNative.activity();
+ Log.d(TAG,String.valueOf(ContextCompat.checkSelfPermission(context,Manifest.permission.POST_NOTIFICATIONS)));
+ if (ContextCompat.checkSelfPermission(context,Manifest.permission.POST_NOTIFICATIONS)!= PackageManager.PERMISSION_GRANTED) {
+ // Permission is not granted
+ Log.d(TAG,String.valueOf(PackageManager.PERMISSION_GRANTED));
+ ActivityCompat.requestPermissions(activity,new String[]{Manifest.permission.POST_NOTIFICATIONS},MY_PERMISSIONS_REQUEST_POST_NOTIFICATIONS);
+ }
}
- **/
}
diff --git a/source-android/application.qrc b/source-android/application.qrc
deleted file mode 100644
index 6f2b8d7..0000000
--- a/source-android/application.qrc
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
- qtquickcontrols2.conf
- qml/friendiqa.qml
- qml/newsqml/NewsTab.qml
- qml/newsqml/Newsitem.qml
- qml/newsqml/MessageSend.qml
- qml/newsqml/Conversation.qml
- qml/newsqml/FriendicaActivities.qml
- qml/contactqml/FriendsTab.qml
- qml/contactqml/GroupComponent.qml
- qml/contactqml/ContactComponent.qml
- qml/contactqml/ContactDetailsComponent.qml
- qml/contactqml/Contactlist.qml
- qml/genericqml/BlueButton.qml
- qml/photoqml/PhotoComponent.qml
- qml/photoqml/PhotogroupComponent.qml
- qml/photoqml/PhotoTab.qml
- qml/configqml/InfoBox.qml
- qml/configqml/ConfigPage.qml
- js/layout.js
- js/photoworker.js
- js/service.js
- js/news.js
- js/newsworker.js
- js/helper.js
- images/defaultcontact.jpg
- images/fontawesome-webfont.ttf
- images/folder-blue.png
- qml/configqml/OSSettingsAndroid.qml
- qml/genericqml/MButton.qml
- qml/configqml/OSSettingsLinux.qml
- qml/newsqml/SmileyDialog.qml
- js/smiley.js
- images/smileys/animals/bee.gif
- images/smileys/animals/bigspider.gif
- images/smileys/animals/bunny.gif
- images/smileys/animals/bunnyflowers.gif
- images/smileys/animals/cat.gif
- images/smileys/animals/chick.gif
- images/smileys/animals/cow.gif
- images/smileys/animals/crab.gif
- images/smileys/animals/dog.gif
- images/smileys/animals/dolphin.gif
- images/smileys/animals/dragonfly.gif
- images/smileys/animals/elephant.gif
- images/smileys/animals/fish.gif
- images/smileys/animals/frog.gif
- images/smileys/animals/giraffe.gif
- images/smileys/animals/hamster.gif
- images/smileys/animals/horse.gif
- images/smileys/animals/ladybird.gif
- images/smileys/animals/monkey.gif
- images/smileys/animals/parrot.gif
- images/smileys/animals/pig.gif
- images/smileys/animals/sheep.gif
- images/smileys/animals/snail.gif
- images/smileys/animals/tux.gif
- images/smileys/babies/baby.gif
- images/smileys/babies/babycot.gif
- images/smileys/babies/pregnant.gif
- images/smileys/babies/stork.gif
- images/smileys/confused/confused.gif
- images/smileys/confused/dazed.gif
- images/smileys/confused/shrug.gif
- images/smileys/confused/stupid.gif
- images/smileys/cool/affro.gif
- images/smileys/cool/cool.gif
- images/smileys/devilangel/angel.gif
- images/smileys/devilangel/blondedevil.gif
- images/smileys/devilangel/catdevil.gif
- images/smileys/devilangel/cherub.gif
- images/smileys/devilangel/daseesaw.gif
- images/smileys/devilangel/devil.gif
- images/smileys/devilangel/graveside.gif
- images/smileys/devilangel/saint.gif
- images/smileys/devilangel/turnevil.gif
- images/smileys/disgust/fartblush.gif
- images/smileys/disgust/fartinbed.gif
- images/smileys/disgust/toilet.gif
- images/smileys/disgust/vomit.gif
- images/smileys/drink/tea.gif
- images/smileys/drool/drool.gif
- images/smileys/fantasy/alienmonster.gif
- images/smileys/fantasy/barbarian.gif
- images/smileys/fantasy/dinosaur.gif
- images/smileys/fantasy/dragon.gif
- images/smileys/fantasy/dragonwhelp.gif
- images/smileys/fantasy/ghost.gif
- images/smileys/fantasy/mummy.gif
- images/smileys/fight/2guns.gif
- images/smileys/fight/acid.gif
- images/smileys/fight/alienfight.gif
- images/smileys/fight/alpha.png
- images/smileys/fight/army.gif
- images/smileys/fight/arrowhead.gif
- images/smileys/fight/bfg.gif
- images/smileys/fight/bowman.gif
- images/smileys/fight/chainsaw.gif
- images/smileys/fight/crossbow.gif
- images/smileys/fight/crusader.gif
- images/smileys/fight/dead.gif
- images/smileys/fight/gangs.gif
- images/smileys/fight/hammersplat.gif
- images/smileys/fight/lasergun.gif
- images/smileys/fight/machinegun.gif
- images/smileys/fight/marine.gif
- images/smileys/fight/sabre.gif
- images/smileys/fight/samurai.gif
- images/smileys/fight/tank.gif
- images/smileys/fight/viking.gif
- images/smileys/food/apple.gif
- images/smileys/food/banana.gif
- images/smileys/food/birthdaycake.gif
- images/smileys/food/broccoli.gif
- images/smileys/food/cake.gif
- images/smileys/food/carrot.gif
- images/smileys/food/cooking.gif
- images/smileys/food/fryegg.gif
- images/smileys/food/popcorn.gif
- images/smileys/food/tomato.gif
- images/smileys/happy/cloud9.gif
- images/smileys/happy/tearsofjoy.gif
- images/smileys/laugh/hahaha.gif
- images/smileys/laugh/loltv.gif
- images/smileys/laugh/rofl.gif
- images/smileys/love/iloveyou.gif
- images/smileys/love/inlove.gif
- images/smileys/love/love.gif
- images/smileys/love/lovebear.gif
- images/smileys/love/lovebed.gif
- images/smileys/love/loveheart.gif
- images/smileys/music/dj.gif
- images/smileys/music/drums.gif
- images/smileys/music/elvis.gif
- images/smileys/music/guitar.gif
- images/smileys/music/trumpet.gif
- images/smileys/music/violin.gif
- images/smileys/oldcore/beard.png
- images/smileys/oldcore/headbang.gif
- images/smileys/oldcore/laughing.gif
- images/smileys/oldcore/shaka.gif
- images/smileys/oldcore/surprised.gif
- images/smileys/oldcore/whitebeard.png
- images/smileys/respect/bow.gif
- images/smileys/respect/bravo.gif
- images/smileys/respect/hailking.gif
- images/smileys/respect/number1.gif
- images/smileys/sad/crying.png
- images/smileys/sad/prisoner.gif
- images/smileys/sad/sigh.gif
- images/smileys/smoking/smoking.gif
- images/smileys/sport/archery.gif
- images/smileys/sport/basketball.gif
- images/smileys/sport/bowling.gif
- images/smileys/sport/cycling.gif
- images/smileys/sport/darts.gif
- images/smileys/sport/fencing.gif
- images/smileys/sport/football.gif
- images/smileys/sport/golf.gif
- images/smileys/sport/horseriding.gif
- images/smileys/sport/juggling.gif
- images/smileys/sport/skipping.gif
- images/smileys/sport/snooker.gif
- images/smileys/sport/surfing.gif
- images/smileys/sport/tennis.gif
- images/smileys/tired/countsheep.gif
- images/smileys/tired/hammock.gif
- images/smileys/tired/pillow.gif
- images/smileys/tired/yawn.gif
- images/smileys/core/beer_mug.gif
- images/smileys/core/coffee.gif
- images/smileys/core/dislike.gif
- images/smileys/core/friendica-16.png
- images/smileys/core/like.gif
- images/smileys/core/rm-16.png
- images/smileys/core/smiley-bangheaddesk.gif
- images/smileys/core/smiley-brokenheart.gif
- images/smileys/core/smiley-cool.gif
- images/smileys/core/smiley-cry.gif
- images/smileys/core/smiley-embarassed.gif
- images/smileys/core/smiley-facepalm.gif
- images/smileys/core/smiley-foot-in-mouth.gif
- images/smileys/core/smiley-heart.gif
- images/smileys/core/smiley-kiss.gif
- images/smileys/core/smiley-laughing.gif
- images/smileys/core/smiley-Oo.gif
- images/smileys/core/smiley-smile.gif
- images/smileys/core/smiley-surprised.gif
- images/smileys/core/smiley-thumbsup.gif
- images/smileys/core/smiley-tongue-out.gif
- images/smileys/core/smiley-undecided.gif
- images/smileys/core/smiley-wink.gif
- images/smileys/core/smiley-frown.gif
- images/smileys/adult/bong.gif
- images/smileys/adult/drunk.gif
- images/smileys/adult/finger.gif
- images/smileys/adult/sperm.gif
- images/smileys/adult/tits.gif
- common/filesystem.cpp
- common/filesystem.h
- common/friendiqa.cpp
- common/uploadableimage.cpp
- common/uploadableimage.h
- common/xhr.cpp
- common/xhr.h
- qml/calendarqml/CalendarTab.qml
- qml/calendarqml/CalendarDay.qml
- qml/calendarqml/EventList.qml
- translations/friendiqa-de.qm
- translations/friendiqa-de.ts
- translations/friendiqa-es.qm
- translations/friendiqa-es.ts
- qml/photoqml/ImageUploadDialog.qml
- qml/genericqml/PermissionDialog.qml
- images/addImage.png
- qml/genericqml/ImagePicker.qml
- qml/genericqml/ImagePickerLinux.qml
- js/image.js
- qml/contactqml/ProfileComponent.qml
- translations/friendiqa-it.ts
- qml/genericqml/Search.qml
- qml/newsqml/Hashtag.qml
- qml/genericqml/IntentReceiver.qml
- qml/newsqml/NewsImage.qml
- qml/newsqml/NewsVideo.qml
- qml/newsqml/ContactPage.qml
- qml/newsqml/NewsLink.qml
- qml/configqml/RegisterPage.qml
- qml/configqml/AccountPage.qml
- qml/newsqml/NewsStack.qml
- qml/configqml/SyncConfig.qml
- qml/configqml/SyncComponent.qml
-
-
diff --git a/source-android/common/alarmandroid.cpp b/source-android/common/alarmandroid.cpp
deleted file mode 100644
index b1fcbfd..0000000
--- a/source-android/common/alarmandroid.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "alarm.h"
-#include
-#include "AndroidNative/systemdispatcher.h"
-
-ALARM *ALARM::instance()
-{
- static ALARM alarm;
- return &alarm;
-}
-
-ALARM::ALARM(QObject *parent) : QObject(parent){}
-
-void ALARM::setAlarm(int interval)
-{
- QVariantMap message;
- message["value"] = interval;
- AndroidNative::SystemDispatcher::instance()->loadClass("androidnative.Util");
- AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.setSchedule", message);
- AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.stopService", message);
-}
-
-void ALARM::notify(QString title, QString text, int id)
-{
- //qDebug() << "notify "<< title << text;
- QVariantMap message;
- message["title"] = title;
- message["message"] = text;
- message["id"] = id;
- AndroidNative::SystemDispatcher::instance()->loadClass("androidnative.Util");
- AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.setNotification", message);
-}
diff --git a/source-android/common/alarmlinux.cpp b/source-android/common/alarmlinux.cpp
deleted file mode 100644
index c9b0a57..0000000
--- a/source-android/common/alarmlinux.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-//#include
-//#include
-#include "alarm.h"
-#include
-#include
-//#include "AndroidNative/systemdispatcher.h"
-
-ALARM *ALARM::instance()
-{
- static ALARM alarm;
- return &alarm;
-}
-
-ALARM::ALARM(QObject *parent) : QObject(parent){}
-
-void ALARM::setAlarm(int interval)
-{
- qDebug() << interval;
- QVariantMap message;
- message["value"] = interval;
- // AndroidNative::SystemDispatcher::instance()->loadClass("androidnative.Util");
- // AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.setSchedule", message);
- //AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.stopService", message);
-}
-
-void ALARM::notify(QString title, QString text, int id)
-{
- qDebug() << title << text;
- QVariantMap message;
- message["title"] = title;
- message["message"] = text;
- QDBusConnection bus = QDBusConnection::sessionBus();
- QDBusInterface dbus_iface("org.freedesktop.Notifications", "/org/freedesktop/Notifications",
- "org.freedesktop.Notifications", bus);
- QString appname="Friendiqa";
- uint v=12321;
- if (dbus_iface.isValid()){
-
- dbus_iface.call("Notify",appname,v,"",title,text,"","",5000);
- }
- // AndroidNative::SystemDispatcher::instance()->dispatch("Notifier.notify", message);
-}
diff --git a/source-android/common/filesystem.h b/source-android/common/filesystem.h
deleted file mode 100644
index c8baae8..0000000
--- a/source-android/common/filesystem.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef FILESYSTEM_H
-#define FILESYSTEM_H
-
-#include
-#include
-//#include
-//#include
-
-class FILESYSTEM : public QObject//, public QAndroidActivityResultReceiver
-{
- Q_OBJECT
- Q_PROPERTY(QString Directory READ Directory WRITE setDirectory NOTIFY directoryChanged)
- //Q_PROPERTY(bool direxist READ direxist)
- Q_PROPERTY(QString homePath READ homePath)
- //Q_PROPERTY(QString cameraPath READ cameraPath)
-
-
-public:
- static FILESYSTEM *instance();
- explicit FILESYSTEM(QObject *parent = 0);
- void setDirectory(QString Directory);
- QString Directory() const;
- QFileInfoList fileList();
- //bool direxist(QString Directory);
- QString homePath() const;
- //QString cameraPath() const;
- // virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data);
-
-signals:
- //void imageselected(QString);
- void directoryChanged();
- //void fileListContent(QList data);
- void success(QString data);
- void error(QString data, int code);
-
-public slots:
- bool fileexist(QString name);
- void makeDir(QString name);
- void rmDir();
- void rmFile(QString name);
- //void searchImage();
- //void fileList();
-
-private:
- QString m_Directory;
- QString homeDir;
- //QList m_Filelist;
-};
-
-#endif // FILSYSTEM_H
diff --git a/source-android/common/friendiqa.cpp b/source-android/common/friendiqa.cpp
index 36077d2..7dc02b5 100644
--- a/source-android/common/friendiqa.cpp
+++ b/source-android/common/friendiqa.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -36,15 +36,13 @@
#include "xhr.h"
#include "updatenews.h"
#include "filesystem.h"
+#include "oauth.h"
#include "remoteauthasyncimageprovider.h"
#include "AndroidNative/systemdispatcher.h"
-//#include "AndroidNative/environment.h"
-//#include "AndroidNative/debug.h"
-//#include "AndroidNative/mediascannerconnection.h"
#ifdef Q_OS_ANDROID
-#include
+#include
#include
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
Q_UNUSED(vm);
@@ -52,30 +50,29 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
AndroidNative::SystemDispatcher::registerNatives();
return JNI_VERSION_1_6;
- }
+ }
#endif
-int main(int argc, char *argv[]) {
- //qDebug()<< "argv Friendiqa"<< argv[0] <<" argv2" <1) && (qstrcmp(argv[1],"-service")==0)){
QAndroidService app(argc, argv);
UPDATENEWS* updatenews= UPDATENEWS::instance();
updatenews->setDatabase();
updatenews->login();
+ updatenews->setSyncAll(true);
updatenews->startsync();
app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
return app.exec();
}
else{
QApplication app(argc, argv);
- QQuickView view;
+ QQmlApplicationEngine view;
QTranslator qtTranslator;
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
app.installTranslator(&qtTranslator);
RemoteAuthAsyncImageProvider *imageProvider = new RemoteAuthAsyncImageProvider;
- view.engine()->addImageProvider("remoteauthimage",imageProvider);
+ view.addImageProvider("remoteauthimage",imageProvider);
view.rootContext()->setContextProperty("remoteauth", imageProvider);
XHR* xhr = XHR::instance();
view.rootContext()->setContextProperty("xhr", xhr);
@@ -85,9 +82,11 @@ int main(int argc, char *argv[]) {
view.rootContext()->setContextProperty("alarm", alarm);
UPDATENEWS* updatenews = UPDATENEWS::instance();
view.rootContext()->setContextProperty("updatenews", updatenews);
- view.setSource(QUrl("qrc:/qml/friendiqa.qml"));
- view.show();
+ OAuthWrapper* oauth2 = OAuthWrapper::instance();
+ view.rootContext()->setContextProperty("oauth2", oauth2);
+ view.load(QUrl("qrc:/qml/friendiqa.qml"));
view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit()));
+
return app.exec();
}
}
diff --git a/source-android/common/remoteauthasyncimageprovider.h b/source-android/common/remoteauthasyncimageprovider.h
deleted file mode 100644
index f028ada..0000000
--- a/source-android/common/remoteauthasyncimageprovider.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef REMOTEAUTHIMAGEPROVIDER_H
-#define REMOTEAUTHIMAGEPROVIDER_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-class AsyncImageResponse : public QQuickImageResponse
-{
- Q_OBJECT
-public:
- explicit AsyncImageResponse(QNetworkRequest req, QSize requestedSize);
- QQuickTextureFactory *textureFactory() const;
-
-public slots:
- void onResponseFinished();
-
-protected:
- QNetworkAccessManager m_imageLoader;
- QNetworkReply* m_reply;
- QSize m_requestedSize;
- QImage m_resultImage;
- int m_index;
- QString m_id;
- QImage m_image;
-};
-
-class RemoteAuthAsyncImageProvider : public QObject, public QQuickAsyncImageProvider
-{
- Q_OBJECT
- Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
- Q_PROPERTY(QString contacturl READ contacturl WRITE setContacturl NOTIFY contacturlChanged)
- Q_PROPERTY(QString login READ login WRITE setLogin NOTIFY loginChanged)
-
-public:
- explicit RemoteAuthAsyncImageProvider();
- QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override;
- QString url() const;
- QString contacturl() const;
- QString login() const;
-
-signals:
- void contacturlChanged();
- void urlChanged();
- void loginChanged();
-
-public slots:
- void setContacturl(QString contacturl);
- void setUrl(QString url);
- void setLogin(QString login);
-
-private:
- QByteArray buffer;
- QString m_url;
- QString m_contacturl;
- QString m_login;
- QString bufferToString();
-};
-
-#endif // REMOTEAUTHIMAGEPROVIDER_H
diff --git a/source-android/common/updatenews.cpp b/source-android/common/updatenews.cpp
deleted file mode 100644
index b86a172..0000000
--- a/source-android/common/updatenews.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "updatenews.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-//#include "AndroidNative/systemdispatcher.h"
-
-
-
-UPDATENEWS *UPDATENEWS::instance()
-{
- static UPDATENEWS udn;
- return &udn;
-}
-
-UPDATENEWS::UPDATENEWS(QObject *parent) : QObject(parent)
-{
-
-}
-
-void UPDATENEWS::setUrl(QString url)
-{
- if (url!=m_url) {
- m_url = url;
- xhr.setUrl(url);
- emit urlChanged(m_url);
- }
-}
-
-
-void UPDATENEWS::setDatabase()
-{
- static QQmlEngine qe;
- QString db_url=qe.offlineStorageDatabaseFilePath("Friendiqa");
- m_db = QSqlDatabase::addDatabase("QSQLITE");
- m_db.setDatabaseName(QUrl("file://"+db_url+".sqlite").toLocalFile());
- //qDebug() << db_url;
-
- if (!m_db.open())
- {
- qDebug() << "Error: connection with database fail " << m_db.lastError();
- }
-}
-
-
-void UPDATENEWS::login()
-{
- QSqlQuery query("SELECT * FROM config WHERE isActive=0",m_db);
- while (query.next())
- {
- username = query.value(1).toString();
- QByteArray bpassword=query.value(2).toByteArray();
- QString password=QByteArray::fromBase64(bpassword);
- m_login=username+":"+password ;
- xhr.setLogin(m_login);
- m_url=query.value(0).toString();
- xhr.setUrl(m_url);
- m_imagedir=query.value(3).toString();
- xhr.setImagedir(m_imagedir);
- QString isActive=query.value(7).toString();
- }
- //m_updateInterval=query.value(5).toInt();
-
-
- QSqlQuery syncquery("SELECT * FROM globaloptions",m_db);
-// QSqlQuery delquery("DELETE FROM globaloptions WHERE k='sync_interval'",m_db);
-// delquery.exec();
- m_updateInterval=0;
- syncindex=0;
- synclist.clear();
- //QSqlQuery syncquery("SELECT * FROM globaloptions WHERE k like 'sync_%' AND v=1",m_db);
- while (syncquery.next()){
- if (syncquery.value(0).toString()=="syncinterval"){
- m_updateInterval=syncquery.value(1).toInt();
- }
- if (syncquery.value(0).toString().left(5)=="sync_" && syncquery.value(1).toInt()==1){
- synclist.append(syncquery.value(0).toString());
- //qDebug() << " sync " << syncquery.value(0).toString() << " " < newcontacts=findNewContacts(news);
- //qDebug()<< "new contacts count " << newcontacts.size();
- if (newcontacts.size()>0){
- updateContacts(newcontacts);
- startImagedownload();
-
- } else {
- if(m_updateInterval!=0){
- syncindex+=1;
- startsync();
- }
- }
- }
- else {
- qDebug()<< "Friendiqa updatenews error " << serverreply;
- emit this->error(m_api,QTextCodec::codecForName("utf-8")->toUnicode(serverreply));
- syncindex+=1;
- startsync();
- }
- }
-
-}
-
-
-
-void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index){
- if (downloadtype=="contactlist"){
- QSqlQuery testquery("SELECT profile_image FROM contacts WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db);
- testquery.first();
- //qDebug()<< "update imageurl for " < UPDATENEWS::findNewContacts(QJsonDocument news){
- QSqlQuery query("SELECT profile_image_url FROM contacts",m_db);
- QList imageurls;
- while (query.next()){
- imageurls.append(query.value(0).toString());
- }
- QList newcontacts;
- //qDebug()<<"updatenews findcontacts news count "< contacts){
- qint64 currentTime =QDateTime::currentMSecsSinceEpoch();
- for (int i=0; i < contacts.count();i++){
- QJsonValue contact=contacts[i];
- QSqlQuery query(m_db);
- //qDebug() << "updatecontact " << contact["screen_name"];
- QSqlQuery testquery("SELECT url FROM contacts WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'",m_db);
- if (testquery.first()){
- query.prepare("UPDATE contacts SET id=?, name=?, screen_name=?, location=?,imageAge=?,"
- "profile_image_url=?, description=?, protected=?, followers_count=?,"
- "friends_count=?, created_at=?, favourites_count=?, utc_offset=?, time_zone=?, statuses_count=?,"
- "following=?, verified=?, statusnet_blocking=?, notifications=?, statusnet_profile_url=?, cid=?, network=?, timestamp=? "
- " WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'");
- query.bindValue(0, contact["id"].toInt());
- query.bindValue(1, contact["name"].toString().toUtf8().toBase64());
- query.bindValue(2, contact["screen_name"]);
- query.bindValue(3, contact["location"]);
- query.bindValue(4, currentTime);
- query.bindValue(5, contact["profile_image_url"].toString().section('?',0,0));
- if(contact["description"].isNull() ){query.bindValue(6,"");}else{query.bindValue(6, contact["description"].toString().toUtf8().toBase64());}
- query.bindValue(7,contact["protected"].toBool());
- query.bindValue(8,contact["followers_count"].toInt());
- query.bindValue(9,contact["friends_count"].toInt());
- QString sourcedate=contact["created_at"].toString();
- QString formateddate=sourcedate.mid(0,3)+", "+sourcedate.mid(8,3)+sourcedate.mid(4,3)+sourcedate.mid(25,5)+sourcedate.mid(10,15);
- query.bindValue(10,QDateTime::fromString(formateddate,Qt::RFC2822Date).toMSecsSinceEpoch() );
- query.bindValue(11,contact["favorites_count"].toInt());
- query.bindValue(12,contact["utc_offset"].toInt());
- query.bindValue(13,contact["time_zone"].toString());
- query.bindValue(14,contact["statuses_count"].toInt());
- query.bindValue(15,contact["following"].toBool());
- query.bindValue(16,contact["verfied"].toBool());
- query.bindValue(17,contact["statusnet_blocking"].toBool());
- query.bindValue(18,contact["notifications"].toBool());
- query.bindValue(19,contact["statusnet_profile_url"]);
- query.bindValue(20,contact["cid"].toInt());
- query.bindValue(21,contact["network"]);
- qint64 timestamp=0;
- QString timestamphelper=contact["profile_image_url"].toString();
- try {timestamp=timestamphelper.mid(timestamphelper.indexOf("?ts")+4,timestamphelper.length()).toUInt();} catch(...){}
- query.bindValue(22,timestamp);
- }
-
- else{
- query.prepare("INSERT INTO contacts (username, id, name, screen_name, location,imageAge,"
- "profile_image_url, description, profile_image, url, protected, followers_count,"
- "friends_count, created_at, favourites_count, utc_offset, time_zone, statuses_count,"
- "following, verified, statusnet_blocking, notifications, statusnet_profile_url, cid, network, isFriend, timestamp)"
- "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-
- query.bindValue(0,username);
- query.bindValue(1, contact["id"].toInt());
- query.bindValue(2, contact["name"].toString().toUtf8().toBase64());
- query.bindValue(3, contact["screen_name"]);
- query.bindValue(4, contact["location"]);
- query.bindValue(5, currentTime);
- query.bindValue(6, contact["profile_image_url"].toString().section('?',0,0));
- if(contact["description"].isNull() ){query.bindValue(7,"");}else{query.bindValue(7, contact["description"].toString().toUtf8().toBase64());}
- query.bindValue(8,"none");
- query.bindValue(9, contact["url"].toString());
- query.bindValue(10,contact["protected"].toBool());
- query.bindValue(11,contact["followers_count"].toInt());
- query.bindValue(12,contact["friends_count"].toInt());
- QString sourcedate=contact["created_at"].toString();
- QString formateddate=sourcedate.mid(0,3)+", "+sourcedate.mid(8,3)+sourcedate.mid(4,3)+sourcedate.mid(25,5)+sourcedate.mid(10,15);
- query.bindValue(13,QDateTime::fromString(formateddate,Qt::RFC2822Date).toMSecsSinceEpoch() );
- query.bindValue(14,contact["favorites_count"].toInt());
- query.bindValue(15,contact["utc_offset"].toInt());
- query.bindValue(16,contact["time_zone"].toString());
- query.bindValue(17,contact["statuses_count"].toInt());
- query.bindValue(18,contact["following"].toBool());
- query.bindValue(19,contact["verfied"].toBool());
- query.bindValue(20,contact["statusnet_blocking"].toBool());
- query.bindValue(21,contact["notifications"].toBool());
- query.bindValue(22,contact["statusnet_profile_url"]);
- query.bindValue(23,contact["cid"].toInt());
- query.bindValue(24,contact["network"]);
- query.bindValue(25, 0);
- qint64 timestamp=0;
- QString timestamphelper=contact["profile_image_url"].toString();
- try {timestamp=timestamphelper.mid(timestamphelper.indexOf("?ts")+4,timestamphelper.length()).toUInt();} catch(...){}
- query.bindValue(26,timestamp);
-
- }
- query.exec() ;
- }
-}
-
-QString UPDATENEWS::url() const
-{
- return m_url;
-}
-
-void UPDATENEWS::startImagedownload()
-{
- //qDebug() << "start image download";
- xhr.setDownloadtype("contactlist");
- xhr.setFilelist(newcontactimagelinks);
- xhr.setContactlist(newcontactnames);
- xhr.setImagedir(m_imagedir);
- xhr.getlist();
-}
-
-void UPDATENEWS::showError(QString data, QString url,QString api, int code )
-{
- qDebug() << "showerror " << api << " data " << data;
- emit this->error(api,data);
- if (api!=m_api || xhr.downloadtype()!=""){} else{
- if(m_updateInterval!=0){
- syncindex+=1;
- startsync();
- }
- }
-}
diff --git a/source-android/common/updatenews.h b/source-android/common/updatenews.h
deleted file mode 100644
index 74acf20..0000000
--- a/source-android/common/updatenews.h
+++ /dev/null
@@ -1,100 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef UPDATENEWS_H
-#define UPDATENEWS_H
-
-#include
-#include
-#include
-#include "xhr.h"
-#include "alarm.h"
-//#include "AndroidNative/systemdispatcher.h"
-
-class UPDATENEWS : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
-// Q_PROPERTY(QString login READ login NOTIFY loginChanged)
-public:
- static UPDATENEWS *instance();
-
- explicit UPDATENEWS(QObject *parent = 0);
-
- QString url() const;
- //QString login() const;
-
-signals:
-
- void urlChanged(QString url);
- void success(QString api);
- void error(QString api, QString content);
- void quitapp();
-
-public slots:
- void setUrl(QString url);
- void setDatabase();
- void login();
- void timeline();
- void replies();
- void startsync();
- void directmessages();
- void notifications();
- //void startservice(QString type,QVariantMap map);
- void startImagedownload();
- void updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index);
- void store(QByteArray serverreply,QString apiname);
- void showError(QString data, QString url,QString api, int code);
-
-private:
- QString m_url;
- QString m_api;
- QString m_imagedir;
- QString m_login;
- QString username;
- int syncindex;
- QSqlDatabase m_db;
- QList synclist;
- QList notifylist;
- QList findNewContacts(QJsonDocument news);
- QJsonObject findNotificationContact(QString imagelink);
- int m_updateInterval;
- //void timeline();
- //void store(QByteArray serverreply,QString apiname);
- void updateContacts(QList contacts);
-
- XHR xhr;
- ALARM alarm;
- QList newcontactimagelinks;
- QList newcontactnames;
-};
-
-#endif // UPDATENEWS_H
diff --git a/source-android/friendiqa.pro b/source-android/friendiqa.pro
index 5d84450..20ff216 100644
--- a/source-android/friendiqa.pro
+++ b/source-android/friendiqa.pro
@@ -13,21 +13,32 @@
TEMPLATE = app
TARGET = friendiqa
CONFIG += release
-QT += qml quick gui widgets androidextras sql webview
+QT += core core-private qml quick gui widgets sql androidextras network networkauth
include(androidnative.pri/androidnative.pri)
SOURCES += common/friendiqa.cpp \
- common/uploadableimage.cpp \
+ common/uploadableimage.cpp \
common/xhr.cpp \
- common/filesystem.cpp \
+ common/filesystemandroid.cpp \
common/remoteauthasyncimageprovider.cpp \
common/updatenews.cpp \
- common/alarmandroid.cpp
+ common/alarmandroid.cpp \
+ common/oauth.cpp
+ lupdate_only{
+ SOURCES = qml/friendiqa.qml \
+ qml/*.qml
+ qml/calendarqml/*.qml
+ qml/configqml/*.qml
+ qml/genericqml/*.qml
+ qml/contactqml/*.qml
+ qml/newsqml/*.qml
+ qml/photoqml/*.qml
+ js/*.js
+ }
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
-
RESOURCES = application.qrc
OTHER_FILES += qml/friendiqa.qml \
@@ -41,7 +52,9 @@ OTHER_FILES += qml/friendiqa.qml \
TRANSLATIONS += translations/friendiqa-de.ts \
translations/friendiqa-es.ts \
- translations/friendiqa-it.ts
+ translations/friendiqa-it.ts \
+ translations/friendiqa-hu.ts \
+ translations/friendiqa-nl.ts
HEADERS += \
common/uploadableimage.h \
@@ -49,9 +62,11 @@ HEADERS += \
common/filesystem.h \
common/remoteauthasyncimageprovider.h \
common/updatenews.h \
- common/alarm.h
+ common/alarm.h \
+ common/oauth.h
DISTFILES += \
+ android/gradle.properties \
qml/calendarqml/*.qml \
android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
@@ -60,6 +75,7 @@ DISTFILES += \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
+ qml/configqml/ConfigAppearancePage.qml \
translations/*.ts \
translations/*.qm \
qml/*.qml \
@@ -70,10 +86,8 @@ DISTFILES += \
js/*.js \
android/androidnative.gradle \
android/src/FriendiqaActivity.java \
- android/src/ExampleService.java
+ android/src/FriendiqaService.java
-contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
- ANDROID_EXTRA_LIBS = \
- $$PWD/android/libcrypto.so \
- $$PWD/android/libssl.so
-}
+#ANDROID_ABIS = arm64-v8a
+
+android: include(/home/pankraz/android-sdk/android_openssl/openssl.pri)
diff --git a/source-android/images/addImage.png b/source-android/images/addImage.png
deleted file mode 100644
index 988f9f1..0000000
Binary files a/source-android/images/addImage.png and /dev/null differ
diff --git a/source-android/images/fontawesome-webfont.ttf b/source-android/images/fontawesome-webfont.ttf
deleted file mode 100644
index 35acda2..0000000
Binary files a/source-android/images/fontawesome-webfont.ttf and /dev/null differ
diff --git a/source-android/images/smileys/adult/bong.gif b/source-android/images/smileys/adult/bong.gif
deleted file mode 100644
index 4b67122..0000000
Binary files a/source-android/images/smileys/adult/bong.gif and /dev/null differ
diff --git a/source-android/images/smileys/adult/drunk.gif b/source-android/images/smileys/adult/drunk.gif
deleted file mode 100644
index 4a1c064..0000000
Binary files a/source-android/images/smileys/adult/drunk.gif and /dev/null differ
diff --git a/source-android/images/smileys/adult/finger.gif b/source-android/images/smileys/adult/finger.gif
deleted file mode 100644
index d45dcb8..0000000
Binary files a/source-android/images/smileys/adult/finger.gif and /dev/null differ
diff --git a/source-android/images/smileys/adult/sperm.gif b/source-android/images/smileys/adult/sperm.gif
deleted file mode 100644
index 6ba9219..0000000
Binary files a/source-android/images/smileys/adult/sperm.gif and /dev/null differ
diff --git a/source-android/images/smileys/adult/tits.gif b/source-android/images/smileys/adult/tits.gif
deleted file mode 100644
index 4c1658c..0000000
Binary files a/source-android/images/smileys/adult/tits.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/bee.gif b/source-android/images/smileys/animals/bee.gif
deleted file mode 100644
index 206c2e3..0000000
Binary files a/source-android/images/smileys/animals/bee.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/bigspider.gif b/source-android/images/smileys/animals/bigspider.gif
deleted file mode 100644
index bc43deb..0000000
Binary files a/source-android/images/smileys/animals/bigspider.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/bunny.gif b/source-android/images/smileys/animals/bunny.gif
deleted file mode 100644
index 402b2b3..0000000
Binary files a/source-android/images/smileys/animals/bunny.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/bunnyflowers.gif b/source-android/images/smileys/animals/bunnyflowers.gif
deleted file mode 100644
index 6d665e2..0000000
Binary files a/source-android/images/smileys/animals/bunnyflowers.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/cat.gif b/source-android/images/smileys/animals/cat.gif
deleted file mode 100644
index a612c47..0000000
Binary files a/source-android/images/smileys/animals/cat.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/chick.gif b/source-android/images/smileys/animals/chick.gif
deleted file mode 100644
index 6bcddcd..0000000
Binary files a/source-android/images/smileys/animals/chick.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/cow.gif b/source-android/images/smileys/animals/cow.gif
deleted file mode 100644
index 3f94cfa..0000000
Binary files a/source-android/images/smileys/animals/cow.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/crab.gif b/source-android/images/smileys/animals/crab.gif
deleted file mode 100644
index db5b8ce..0000000
Binary files a/source-android/images/smileys/animals/crab.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/dog.gif b/source-android/images/smileys/animals/dog.gif
deleted file mode 100644
index 7b28477..0000000
Binary files a/source-android/images/smileys/animals/dog.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/dolphin.gif b/source-android/images/smileys/animals/dolphin.gif
deleted file mode 100644
index 672ebd7..0000000
Binary files a/source-android/images/smileys/animals/dolphin.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/dragonfly.gif b/source-android/images/smileys/animals/dragonfly.gif
deleted file mode 100644
index 566e95c..0000000
Binary files a/source-android/images/smileys/animals/dragonfly.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/elephant.gif b/source-android/images/smileys/animals/elephant.gif
deleted file mode 100644
index 4311e97..0000000
Binary files a/source-android/images/smileys/animals/elephant.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/fish.gif b/source-android/images/smileys/animals/fish.gif
deleted file mode 100644
index 3a7a584..0000000
Binary files a/source-android/images/smileys/animals/fish.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/frog.gif b/source-android/images/smileys/animals/frog.gif
deleted file mode 100644
index 85e4b56..0000000
Binary files a/source-android/images/smileys/animals/frog.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/giraffe.gif b/source-android/images/smileys/animals/giraffe.gif
deleted file mode 100644
index 4c95ea4..0000000
Binary files a/source-android/images/smileys/animals/giraffe.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/hamster.gif b/source-android/images/smileys/animals/hamster.gif
deleted file mode 100644
index 96c7323..0000000
Binary files a/source-android/images/smileys/animals/hamster.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/horse.gif b/source-android/images/smileys/animals/horse.gif
deleted file mode 100644
index 9103abf..0000000
Binary files a/source-android/images/smileys/animals/horse.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/ladybird.gif b/source-android/images/smileys/animals/ladybird.gif
deleted file mode 100644
index 69444a9..0000000
Binary files a/source-android/images/smileys/animals/ladybird.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/monkey.gif b/source-android/images/smileys/animals/monkey.gif
deleted file mode 100644
index b9b338d..0000000
Binary files a/source-android/images/smileys/animals/monkey.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/parrot.gif b/source-android/images/smileys/animals/parrot.gif
deleted file mode 100644
index ae6faf6..0000000
Binary files a/source-android/images/smileys/animals/parrot.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/pig.gif b/source-android/images/smileys/animals/pig.gif
deleted file mode 100644
index bdc68e8..0000000
Binary files a/source-android/images/smileys/animals/pig.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/sheep.gif b/source-android/images/smileys/animals/sheep.gif
deleted file mode 100644
index 8fafc11..0000000
Binary files a/source-android/images/smileys/animals/sheep.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/snail.gif b/source-android/images/smileys/animals/snail.gif
deleted file mode 100644
index 3bdb44c..0000000
Binary files a/source-android/images/smileys/animals/snail.gif and /dev/null differ
diff --git a/source-android/images/smileys/animals/tux.gif b/source-android/images/smileys/animals/tux.gif
deleted file mode 100644
index 08e006e..0000000
Binary files a/source-android/images/smileys/animals/tux.gif and /dev/null differ
diff --git a/source-android/images/smileys/babies/baby.gif b/source-android/images/smileys/babies/baby.gif
deleted file mode 100644
index d105afb..0000000
Binary files a/source-android/images/smileys/babies/baby.gif and /dev/null differ
diff --git a/source-android/images/smileys/babies/babycot.gif b/source-android/images/smileys/babies/babycot.gif
deleted file mode 100644
index 750f6df..0000000
Binary files a/source-android/images/smileys/babies/babycot.gif and /dev/null differ
diff --git a/source-android/images/smileys/babies/pregnant.gif b/source-android/images/smileys/babies/pregnant.gif
deleted file mode 100644
index d97f476..0000000
Binary files a/source-android/images/smileys/babies/pregnant.gif and /dev/null differ
diff --git a/source-android/images/smileys/babies/stork.gif b/source-android/images/smileys/babies/stork.gif
deleted file mode 100644
index de2371d..0000000
Binary files a/source-android/images/smileys/babies/stork.gif and /dev/null differ
diff --git a/source-android/images/smileys/confused/confused.gif b/source-android/images/smileys/confused/confused.gif
deleted file mode 100644
index 8f1b79a..0000000
Binary files a/source-android/images/smileys/confused/confused.gif and /dev/null differ
diff --git a/source-android/images/smileys/confused/dazed.gif b/source-android/images/smileys/confused/dazed.gif
deleted file mode 100644
index f5e7ec2..0000000
Binary files a/source-android/images/smileys/confused/dazed.gif and /dev/null differ
diff --git a/source-android/images/smileys/confused/shrug.gif b/source-android/images/smileys/confused/shrug.gif
deleted file mode 100644
index 31ce007..0000000
Binary files a/source-android/images/smileys/confused/shrug.gif and /dev/null differ
diff --git a/source-android/images/smileys/confused/stupid.gif b/source-android/images/smileys/confused/stupid.gif
deleted file mode 100644
index c17170a..0000000
Binary files a/source-android/images/smileys/confused/stupid.gif and /dev/null differ
diff --git a/source-android/images/smileys/cool/affro.gif b/source-android/images/smileys/cool/affro.gif
deleted file mode 100644
index f06166b..0000000
Binary files a/source-android/images/smileys/cool/affro.gif and /dev/null differ
diff --git a/source-android/images/smileys/cool/cool.gif b/source-android/images/smileys/cool/cool.gif
deleted file mode 100644
index 05ba9f1..0000000
Binary files a/source-android/images/smileys/cool/cool.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/beer_mug.gif b/source-android/images/smileys/core/beer_mug.gif
deleted file mode 100644
index 9a3e051..0000000
Binary files a/source-android/images/smileys/core/beer_mug.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/coffee.gif b/source-android/images/smileys/core/coffee.gif
deleted file mode 100644
index 7e20371..0000000
Binary files a/source-android/images/smileys/core/coffee.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/dislike.gif b/source-android/images/smileys/core/dislike.gif
deleted file mode 100644
index 7777942..0000000
Binary files a/source-android/images/smileys/core/dislike.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/friendica-16.png b/source-android/images/smileys/core/friendica-16.png
deleted file mode 100644
index 745b7ac..0000000
Binary files a/source-android/images/smileys/core/friendica-16.png and /dev/null differ
diff --git a/source-android/images/smileys/core/like.gif b/source-android/images/smileys/core/like.gif
deleted file mode 100644
index f71d032..0000000
Binary files a/source-android/images/smileys/core/like.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/rm-16.png b/source-android/images/smileys/core/rm-16.png
deleted file mode 100644
index 9361ef2..0000000
Binary files a/source-android/images/smileys/core/rm-16.png and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-Oo.gif b/source-android/images/smileys/core/smiley-Oo.gif
deleted file mode 100644
index a15d974..0000000
Binary files a/source-android/images/smileys/core/smiley-Oo.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-bangheaddesk.gif b/source-android/images/smileys/core/smiley-bangheaddesk.gif
deleted file mode 100644
index 91ccb8b..0000000
Binary files a/source-android/images/smileys/core/smiley-bangheaddesk.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-brokenheart.gif b/source-android/images/smileys/core/smiley-brokenheart.gif
deleted file mode 100644
index 971b57f..0000000
Binary files a/source-android/images/smileys/core/smiley-brokenheart.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-cool.gif b/source-android/images/smileys/core/smiley-cool.gif
deleted file mode 100644
index cee1c1a..0000000
Binary files a/source-android/images/smileys/core/smiley-cool.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-cry.gif b/source-android/images/smileys/core/smiley-cry.gif
deleted file mode 100644
index 06e6ca2..0000000
Binary files a/source-android/images/smileys/core/smiley-cry.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-embarassed.gif b/source-android/images/smileys/core/smiley-embarassed.gif
deleted file mode 100644
index adc12e7..0000000
Binary files a/source-android/images/smileys/core/smiley-embarassed.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-facepalm.gif b/source-android/images/smileys/core/smiley-facepalm.gif
deleted file mode 100644
index 7243703..0000000
Binary files a/source-android/images/smileys/core/smiley-facepalm.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-foot-in-mouth.gif b/source-android/images/smileys/core/smiley-foot-in-mouth.gif
deleted file mode 100644
index b444e57..0000000
Binary files a/source-android/images/smileys/core/smiley-foot-in-mouth.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-frown.gif b/source-android/images/smileys/core/smiley-frown.gif
deleted file mode 100644
index 9ff1985..0000000
Binary files a/source-android/images/smileys/core/smiley-frown.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-heart.gif b/source-android/images/smileys/core/smiley-heart.gif
deleted file mode 100644
index 6a11e70..0000000
Binary files a/source-android/images/smileys/core/smiley-heart.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-kiss.gif b/source-android/images/smileys/core/smiley-kiss.gif
deleted file mode 100644
index cc35661..0000000
Binary files a/source-android/images/smileys/core/smiley-kiss.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-laughing.gif b/source-android/images/smileys/core/smiley-laughing.gif
deleted file mode 100644
index 1bf29de..0000000
Binary files a/source-android/images/smileys/core/smiley-laughing.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-smile.gif b/source-android/images/smileys/core/smiley-smile.gif
deleted file mode 100644
index b9bff40..0000000
Binary files a/source-android/images/smileys/core/smiley-smile.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-surprised.gif b/source-android/images/smileys/core/smiley-surprised.gif
deleted file mode 100644
index b074653..0000000
Binary files a/source-android/images/smileys/core/smiley-surprised.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-thumbsup.gif b/source-android/images/smileys/core/smiley-thumbsup.gif
deleted file mode 100644
index 1bc6b12..0000000
Binary files a/source-android/images/smileys/core/smiley-thumbsup.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-tongue-out.gif b/source-android/images/smileys/core/smiley-tongue-out.gif
deleted file mode 100644
index 48867dc..0000000
Binary files a/source-android/images/smileys/core/smiley-tongue-out.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-undecided.gif b/source-android/images/smileys/core/smiley-undecided.gif
deleted file mode 100644
index 2802979..0000000
Binary files a/source-android/images/smileys/core/smiley-undecided.gif and /dev/null differ
diff --git a/source-android/images/smileys/core/smiley-wink.gif b/source-android/images/smileys/core/smiley-wink.gif
deleted file mode 100644
index e1cefb0..0000000
Binary files a/source-android/images/smileys/core/smiley-wink.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/angel.gif b/source-android/images/smileys/devilangel/angel.gif
deleted file mode 100644
index 8e58541..0000000
Binary files a/source-android/images/smileys/devilangel/angel.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/blondedevil.gif b/source-android/images/smileys/devilangel/blondedevil.gif
deleted file mode 100644
index 09e7e68..0000000
Binary files a/source-android/images/smileys/devilangel/blondedevil.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/catdevil.gif b/source-android/images/smileys/devilangel/catdevil.gif
deleted file mode 100644
index 269d719..0000000
Binary files a/source-android/images/smileys/devilangel/catdevil.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/cherub.gif b/source-android/images/smileys/devilangel/cherub.gif
deleted file mode 100644
index 40872e0..0000000
Binary files a/source-android/images/smileys/devilangel/cherub.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/daseesaw.gif b/source-android/images/smileys/devilangel/daseesaw.gif
deleted file mode 100644
index 1c04b2e..0000000
Binary files a/source-android/images/smileys/devilangel/daseesaw.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/devil.gif b/source-android/images/smileys/devilangel/devil.gif
deleted file mode 100644
index 2b56797..0000000
Binary files a/source-android/images/smileys/devilangel/devil.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/graveside.gif b/source-android/images/smileys/devilangel/graveside.gif
deleted file mode 100644
index 0e90935..0000000
Binary files a/source-android/images/smileys/devilangel/graveside.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/saint.gif b/source-android/images/smileys/devilangel/saint.gif
deleted file mode 100644
index 52c22c4..0000000
Binary files a/source-android/images/smileys/devilangel/saint.gif and /dev/null differ
diff --git a/source-android/images/smileys/devilangel/turnevil.gif b/source-android/images/smileys/devilangel/turnevil.gif
deleted file mode 100644
index 1490c0f..0000000
Binary files a/source-android/images/smileys/devilangel/turnevil.gif and /dev/null differ
diff --git a/source-android/images/smileys/disgust/fartblush.gif b/source-android/images/smileys/disgust/fartblush.gif
deleted file mode 100644
index 4160a1f..0000000
Binary files a/source-android/images/smileys/disgust/fartblush.gif and /dev/null differ
diff --git a/source-android/images/smileys/disgust/fartinbed.gif b/source-android/images/smileys/disgust/fartinbed.gif
deleted file mode 100644
index 5553649..0000000
Binary files a/source-android/images/smileys/disgust/fartinbed.gif and /dev/null differ
diff --git a/source-android/images/smileys/disgust/toilet.gif b/source-android/images/smileys/disgust/toilet.gif
deleted file mode 100644
index 092d7ca..0000000
Binary files a/source-android/images/smileys/disgust/toilet.gif and /dev/null differ
diff --git a/source-android/images/smileys/disgust/vomit.gif b/source-android/images/smileys/disgust/vomit.gif
deleted file mode 100644
index 6e7e727..0000000
Binary files a/source-android/images/smileys/disgust/vomit.gif and /dev/null differ
diff --git a/source-android/images/smileys/drink/tea.gif b/source-android/images/smileys/drink/tea.gif
deleted file mode 100644
index 474b989..0000000
Binary files a/source-android/images/smileys/drink/tea.gif and /dev/null differ
diff --git a/source-android/images/smileys/drool/drool.gif b/source-android/images/smileys/drool/drool.gif
deleted file mode 100644
index 4093df6..0000000
Binary files a/source-android/images/smileys/drool/drool.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/alienmonster.gif b/source-android/images/smileys/fantasy/alienmonster.gif
deleted file mode 100644
index e0ca7f6..0000000
Binary files a/source-android/images/smileys/fantasy/alienmonster.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/barbarian.gif b/source-android/images/smileys/fantasy/barbarian.gif
deleted file mode 100644
index de8a068..0000000
Binary files a/source-android/images/smileys/fantasy/barbarian.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/dinosaur.gif b/source-android/images/smileys/fantasy/dinosaur.gif
deleted file mode 100644
index e8c625c..0000000
Binary files a/source-android/images/smileys/fantasy/dinosaur.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/dragon.gif b/source-android/images/smileys/fantasy/dragon.gif
deleted file mode 100644
index fd28fbf..0000000
Binary files a/source-android/images/smileys/fantasy/dragon.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/dragonwhelp.gif b/source-android/images/smileys/fantasy/dragonwhelp.gif
deleted file mode 100644
index dbc4555..0000000
Binary files a/source-android/images/smileys/fantasy/dragonwhelp.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/ghost.gif b/source-android/images/smileys/fantasy/ghost.gif
deleted file mode 100644
index 4c5d85d..0000000
Binary files a/source-android/images/smileys/fantasy/ghost.gif and /dev/null differ
diff --git a/source-android/images/smileys/fantasy/mummy.gif b/source-android/images/smileys/fantasy/mummy.gif
deleted file mode 100644
index 50e1dfb..0000000
Binary files a/source-android/images/smileys/fantasy/mummy.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/2guns.gif b/source-android/images/smileys/fight/2guns.gif
deleted file mode 100644
index 9e1b663..0000000
Binary files a/source-android/images/smileys/fight/2guns.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/acid.gif b/source-android/images/smileys/fight/acid.gif
deleted file mode 100644
index fa55f67..0000000
Binary files a/source-android/images/smileys/fight/acid.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/alienfight.gif b/source-android/images/smileys/fight/alienfight.gif
deleted file mode 100644
index 9d5e879..0000000
Binary files a/source-android/images/smileys/fight/alienfight.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/alpha.png b/source-android/images/smileys/fight/alpha.png
deleted file mode 100644
index 09e3f23..0000000
Binary files a/source-android/images/smileys/fight/alpha.png and /dev/null differ
diff --git a/source-android/images/smileys/fight/army.gif b/source-android/images/smileys/fight/army.gif
deleted file mode 100644
index 7506700..0000000
Binary files a/source-android/images/smileys/fight/army.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/arrowhead.gif b/source-android/images/smileys/fight/arrowhead.gif
deleted file mode 100644
index f4572c4..0000000
Binary files a/source-android/images/smileys/fight/arrowhead.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/bfg.gif b/source-android/images/smileys/fight/bfg.gif
deleted file mode 100644
index c2ba9d0..0000000
Binary files a/source-android/images/smileys/fight/bfg.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/bowman.gif b/source-android/images/smileys/fight/bowman.gif
deleted file mode 100644
index 2f1f8f0..0000000
Binary files a/source-android/images/smileys/fight/bowman.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/chainsaw.gif b/source-android/images/smileys/fight/chainsaw.gif
deleted file mode 100644
index 71f757c..0000000
Binary files a/source-android/images/smileys/fight/chainsaw.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/crossbow.gif b/source-android/images/smileys/fight/crossbow.gif
deleted file mode 100644
index 20874f3..0000000
Binary files a/source-android/images/smileys/fight/crossbow.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/crusader.gif b/source-android/images/smileys/fight/crusader.gif
deleted file mode 100644
index 95848ae..0000000
Binary files a/source-android/images/smileys/fight/crusader.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/dead.gif b/source-android/images/smileys/fight/dead.gif
deleted file mode 100644
index 31adaba..0000000
Binary files a/source-android/images/smileys/fight/dead.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/gangs.gif b/source-android/images/smileys/fight/gangs.gif
deleted file mode 100644
index 2c655b1..0000000
Binary files a/source-android/images/smileys/fight/gangs.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/hammersplat.gif b/source-android/images/smileys/fight/hammersplat.gif
deleted file mode 100644
index 95bd540..0000000
Binary files a/source-android/images/smileys/fight/hammersplat.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/lasergun.gif b/source-android/images/smileys/fight/lasergun.gif
deleted file mode 100644
index f3f82cb..0000000
Binary files a/source-android/images/smileys/fight/lasergun.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/machinegun.gif b/source-android/images/smileys/fight/machinegun.gif
deleted file mode 100644
index 1cff5cc..0000000
Binary files a/source-android/images/smileys/fight/machinegun.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/marine.gif b/source-android/images/smileys/fight/marine.gif
deleted file mode 100644
index 88fd2e0..0000000
Binary files a/source-android/images/smileys/fight/marine.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/sabre.gif b/source-android/images/smileys/fight/sabre.gif
deleted file mode 100644
index e623968..0000000
Binary files a/source-android/images/smileys/fight/sabre.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/samurai.gif b/source-android/images/smileys/fight/samurai.gif
deleted file mode 100644
index 8b24385..0000000
Binary files a/source-android/images/smileys/fight/samurai.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/tank.gif b/source-android/images/smileys/fight/tank.gif
deleted file mode 100644
index f1d969d..0000000
Binary files a/source-android/images/smileys/fight/tank.gif and /dev/null differ
diff --git a/source-android/images/smileys/fight/viking.gif b/source-android/images/smileys/fight/viking.gif
deleted file mode 100644
index 4908edd..0000000
Binary files a/source-android/images/smileys/fight/viking.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/apple.gif b/source-android/images/smileys/food/apple.gif
deleted file mode 100644
index 969d4ca..0000000
Binary files a/source-android/images/smileys/food/apple.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/banana.gif b/source-android/images/smileys/food/banana.gif
deleted file mode 100644
index d990d19..0000000
Binary files a/source-android/images/smileys/food/banana.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/birthdaycake.gif b/source-android/images/smileys/food/birthdaycake.gif
deleted file mode 100644
index 30ebceb..0000000
Binary files a/source-android/images/smileys/food/birthdaycake.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/broccoli.gif b/source-android/images/smileys/food/broccoli.gif
deleted file mode 100644
index f379889..0000000
Binary files a/source-android/images/smileys/food/broccoli.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/cake.gif b/source-android/images/smileys/food/cake.gif
deleted file mode 100644
index 22d0ebd..0000000
Binary files a/source-android/images/smileys/food/cake.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/carrot.gif b/source-android/images/smileys/food/carrot.gif
deleted file mode 100644
index 387b94c..0000000
Binary files a/source-android/images/smileys/food/carrot.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/cooking.gif b/source-android/images/smileys/food/cooking.gif
deleted file mode 100644
index e62fea0..0000000
Binary files a/source-android/images/smileys/food/cooking.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/fryegg.gif b/source-android/images/smileys/food/fryegg.gif
deleted file mode 100644
index bd1b4ff..0000000
Binary files a/source-android/images/smileys/food/fryegg.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/popcorn.gif b/source-android/images/smileys/food/popcorn.gif
deleted file mode 100644
index b0ea697..0000000
Binary files a/source-android/images/smileys/food/popcorn.gif and /dev/null differ
diff --git a/source-android/images/smileys/food/tomato.gif b/source-android/images/smileys/food/tomato.gif
deleted file mode 100644
index 0e3dadd..0000000
Binary files a/source-android/images/smileys/food/tomato.gif and /dev/null differ
diff --git a/source-android/images/smileys/happy/cloud9.gif b/source-android/images/smileys/happy/cloud9.gif
deleted file mode 100644
index 801c1a3..0000000
Binary files a/source-android/images/smileys/happy/cloud9.gif and /dev/null differ
diff --git a/source-android/images/smileys/happy/tearsofjoy.gif b/source-android/images/smileys/happy/tearsofjoy.gif
deleted file mode 100644
index 5de3117..0000000
Binary files a/source-android/images/smileys/happy/tearsofjoy.gif and /dev/null differ
diff --git a/source-android/images/smileys/laugh/hahaha.gif b/source-android/images/smileys/laugh/hahaha.gif
deleted file mode 100644
index 37aa92a..0000000
Binary files a/source-android/images/smileys/laugh/hahaha.gif and /dev/null differ
diff --git a/source-android/images/smileys/laugh/loltv.gif b/source-android/images/smileys/laugh/loltv.gif
deleted file mode 100644
index 3de6f77..0000000
Binary files a/source-android/images/smileys/laugh/loltv.gif and /dev/null differ
diff --git a/source-android/images/smileys/laugh/rofl.gif b/source-android/images/smileys/laugh/rofl.gif
deleted file mode 100644
index a3bb03d..0000000
Binary files a/source-android/images/smileys/laugh/rofl.gif and /dev/null differ
diff --git a/source-android/images/smileys/love/iloveyou.gif b/source-android/images/smileys/love/iloveyou.gif
deleted file mode 100644
index 7007515..0000000
Binary files a/source-android/images/smileys/love/iloveyou.gif and /dev/null differ
diff --git a/source-android/images/smileys/love/inlove.gif b/source-android/images/smileys/love/inlove.gif
deleted file mode 100644
index 30357af..0000000
Binary files a/source-android/images/smileys/love/inlove.gif and /dev/null differ
diff --git a/source-android/images/smileys/love/love.gif b/source-android/images/smileys/love/love.gif
deleted file mode 100644
index d8f0d5b..0000000
Binary files a/source-android/images/smileys/love/love.gif and /dev/null differ
diff --git a/source-android/images/smileys/love/lovebear.gif b/source-android/images/smileys/love/lovebear.gif
deleted file mode 100644
index d13fd18..0000000
Binary files a/source-android/images/smileys/love/lovebear.gif and /dev/null differ
diff --git a/source-android/images/smileys/love/lovebed.gif b/source-android/images/smileys/love/lovebed.gif
deleted file mode 100644
index c5783e0..0000000
Binary files a/source-android/images/smileys/love/lovebed.gif and /dev/null differ
diff --git a/source-android/images/smileys/love/loveheart.gif b/source-android/images/smileys/love/loveheart.gif
deleted file mode 100644
index 541220a..0000000
Binary files a/source-android/images/smileys/love/loveheart.gif and /dev/null differ
diff --git a/source-android/images/smileys/music/dj.gif b/source-android/images/smileys/music/dj.gif
deleted file mode 100644
index 66bc075..0000000
Binary files a/source-android/images/smileys/music/dj.gif and /dev/null differ
diff --git a/source-android/images/smileys/music/drums.gif b/source-android/images/smileys/music/drums.gif
deleted file mode 100644
index 27215f4..0000000
Binary files a/source-android/images/smileys/music/drums.gif and /dev/null differ
diff --git a/source-android/images/smileys/music/elvis.gif b/source-android/images/smileys/music/elvis.gif
deleted file mode 100644
index ebcdccc..0000000
Binary files a/source-android/images/smileys/music/elvis.gif and /dev/null differ
diff --git a/source-android/images/smileys/music/guitar.gif b/source-android/images/smileys/music/guitar.gif
deleted file mode 100644
index 11eccdd..0000000
Binary files a/source-android/images/smileys/music/guitar.gif and /dev/null differ
diff --git a/source-android/images/smileys/music/trumpet.gif b/source-android/images/smileys/music/trumpet.gif
deleted file mode 100644
index 4595ccc..0000000
Binary files a/source-android/images/smileys/music/trumpet.gif and /dev/null differ
diff --git a/source-android/images/smileys/music/violin.gif b/source-android/images/smileys/music/violin.gif
deleted file mode 100644
index 53592d6..0000000
Binary files a/source-android/images/smileys/music/violin.gif and /dev/null differ
diff --git a/source-android/images/smileys/oldcore/beard.png b/source-android/images/smileys/oldcore/beard.png
deleted file mode 100644
index 5d4b284..0000000
Binary files a/source-android/images/smileys/oldcore/beard.png and /dev/null differ
diff --git a/source-android/images/smileys/oldcore/headbang.gif b/source-android/images/smileys/oldcore/headbang.gif
deleted file mode 100644
index 91ccb8b..0000000
Binary files a/source-android/images/smileys/oldcore/headbang.gif and /dev/null differ
diff --git a/source-android/images/smileys/oldcore/laughing.gif b/source-android/images/smileys/oldcore/laughing.gif
deleted file mode 100644
index 1bf29de..0000000
Binary files a/source-android/images/smileys/oldcore/laughing.gif and /dev/null differ
diff --git a/source-android/images/smileys/oldcore/shaka.gif b/source-android/images/smileys/oldcore/shaka.gif
deleted file mode 100644
index e5d7b70..0000000
Binary files a/source-android/images/smileys/oldcore/shaka.gif and /dev/null differ
diff --git a/source-android/images/smileys/oldcore/surprised.gif b/source-android/images/smileys/oldcore/surprised.gif
deleted file mode 100644
index b074653..0000000
Binary files a/source-android/images/smileys/oldcore/surprised.gif and /dev/null differ
diff --git a/source-android/images/smileys/oldcore/whitebeard.png b/source-android/images/smileys/oldcore/whitebeard.png
deleted file mode 100644
index 2a1fccb..0000000
Binary files a/source-android/images/smileys/oldcore/whitebeard.png and /dev/null differ
diff --git a/source-android/images/smileys/respect/bow.gif b/source-android/images/smileys/respect/bow.gif
deleted file mode 100644
index ecc6484..0000000
Binary files a/source-android/images/smileys/respect/bow.gif and /dev/null differ
diff --git a/source-android/images/smileys/respect/bravo.gif b/source-android/images/smileys/respect/bravo.gif
deleted file mode 100644
index 34f72ab..0000000
Binary files a/source-android/images/smileys/respect/bravo.gif and /dev/null differ
diff --git a/source-android/images/smileys/respect/hailking.gif b/source-android/images/smileys/respect/hailking.gif
deleted file mode 100644
index 07551e5..0000000
Binary files a/source-android/images/smileys/respect/hailking.gif and /dev/null differ
diff --git a/source-android/images/smileys/respect/number1.gif b/source-android/images/smileys/respect/number1.gif
deleted file mode 100644
index ab5c410..0000000
Binary files a/source-android/images/smileys/respect/number1.gif and /dev/null differ
diff --git a/source-android/images/smileys/sad/crying.png b/source-android/images/smileys/sad/crying.png
deleted file mode 100644
index 62b9646..0000000
Binary files a/source-android/images/smileys/sad/crying.png and /dev/null differ
diff --git a/source-android/images/smileys/sad/prisoner.gif b/source-android/images/smileys/sad/prisoner.gif
deleted file mode 100644
index f2c3181..0000000
Binary files a/source-android/images/smileys/sad/prisoner.gif and /dev/null differ
diff --git a/source-android/images/smileys/sad/sigh.gif b/source-android/images/smileys/sad/sigh.gif
deleted file mode 100644
index 6860226..0000000
Binary files a/source-android/images/smileys/sad/sigh.gif and /dev/null differ
diff --git a/source-android/images/smileys/smoking/smoking.gif b/source-android/images/smileys/smoking/smoking.gif
deleted file mode 100644
index 77720b1..0000000
Binary files a/source-android/images/smileys/smoking/smoking.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/archery.gif b/source-android/images/smileys/sport/archery.gif
deleted file mode 100644
index 8b4b9f6..0000000
Binary files a/source-android/images/smileys/sport/archery.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/basketball.gif b/source-android/images/smileys/sport/basketball.gif
deleted file mode 100644
index e9ad4b5..0000000
Binary files a/source-android/images/smileys/sport/basketball.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/bowling.gif b/source-android/images/smileys/sport/bowling.gif
deleted file mode 100644
index 0f8300c..0000000
Binary files a/source-android/images/smileys/sport/bowling.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/cycling.gif b/source-android/images/smileys/sport/cycling.gif
deleted file mode 100644
index 332081e..0000000
Binary files a/source-android/images/smileys/sport/cycling.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/darts.gif b/source-android/images/smileys/sport/darts.gif
deleted file mode 100644
index 09fb6ea..0000000
Binary files a/source-android/images/smileys/sport/darts.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/fencing.gif b/source-android/images/smileys/sport/fencing.gif
deleted file mode 100644
index a4ec5cd..0000000
Binary files a/source-android/images/smileys/sport/fencing.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/football.gif b/source-android/images/smileys/sport/football.gif
deleted file mode 100644
index c9fa6c5..0000000
Binary files a/source-android/images/smileys/sport/football.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/golf.gif b/source-android/images/smileys/sport/golf.gif
deleted file mode 100644
index 179fc52..0000000
Binary files a/source-android/images/smileys/sport/golf.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/horseriding.gif b/source-android/images/smileys/sport/horseriding.gif
deleted file mode 100644
index 13ca450..0000000
Binary files a/source-android/images/smileys/sport/horseriding.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/juggling.gif b/source-android/images/smileys/sport/juggling.gif
deleted file mode 100644
index 1a2eb60..0000000
Binary files a/source-android/images/smileys/sport/juggling.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/skipping.gif b/source-android/images/smileys/sport/skipping.gif
deleted file mode 100644
index f63270b..0000000
Binary files a/source-android/images/smileys/sport/skipping.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/snooker.gif b/source-android/images/smileys/sport/snooker.gif
deleted file mode 100644
index fa2e6a8..0000000
Binary files a/source-android/images/smileys/sport/snooker.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/surfing.gif b/source-android/images/smileys/sport/surfing.gif
deleted file mode 100644
index b75d74b..0000000
Binary files a/source-android/images/smileys/sport/surfing.gif and /dev/null differ
diff --git a/source-android/images/smileys/sport/tennis.gif b/source-android/images/smileys/sport/tennis.gif
deleted file mode 100644
index 36e47bf..0000000
Binary files a/source-android/images/smileys/sport/tennis.gif and /dev/null differ
diff --git a/source-android/images/smileys/tired/countsheep.gif b/source-android/images/smileys/tired/countsheep.gif
deleted file mode 100644
index 815b090..0000000
Binary files a/source-android/images/smileys/tired/countsheep.gif and /dev/null differ
diff --git a/source-android/images/smileys/tired/hammock.gif b/source-android/images/smileys/tired/hammock.gif
deleted file mode 100644
index 8639dd3..0000000
Binary files a/source-android/images/smileys/tired/hammock.gif and /dev/null differ
diff --git a/source-android/images/smileys/tired/pillow.gif b/source-android/images/smileys/tired/pillow.gif
deleted file mode 100644
index 367f65e..0000000
Binary files a/source-android/images/smileys/tired/pillow.gif and /dev/null differ
diff --git a/source-android/images/smileys/tired/yawn.gif b/source-android/images/smileys/tired/yawn.gif
deleted file mode 100644
index d451480..0000000
Binary files a/source-android/images/smileys/tired/yawn.gif and /dev/null differ
diff --git a/source-android/js/friendworker.js b/source-android/js/friendworker.js
deleted file mode 100644
index 1d30709..0000000
--- a/source-android/js/friendworker.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-WorkerScript.onMessage = function(msg) {
- msg.model.clear();
- for (var j=0;j
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-.import "qrc:/js/helper.js" as Helperjs
-
-function requestList(login,database,onlynew,rootwindow,callback) {
- //get list of own images and call download function
- Helperjs.friendicaRequest(login,"/api/friendica/photos/list", rootwindow,function (helperobject){
- //print("return"+helperobject);
- var obj=JSON.parse(helperobject);
- if (onlynew){Helperjs.readField("id",database,"imageData",login.username,function(AllStoredImages){
- if (AllStoredImages.length>0){
- for(var i=0;i< AllStoredImages.length;i++){
- var position=Helperjs.inArray(obj,"id",AllStoredImages[i]);
- if (position>-1){obj.splice(position,1)}
- }
- }
- callback(obj)
- })}
- else{callback(obj)}
-})}
-
-function dataRequest(login,photoID,database,xhr,rootwindow) {
- // check if image exist and call download function
- Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photoID, rootwindow, function (image){
- try{ if(image==""){currentimageno=currentimageno+1}else{
- var obj = JSON.parse(image);
- var helpfilename=obj.filename.substring(0,obj.filename.lastIndexOf("."));
- var filesuffix="";
- if (obj.type=="image/jpeg"){filesuffix=".jpg"}
- else if (obj.type=="image/png"){filesuffix=".png"}
- else {filesuffix=""}
- if (helpfilename==""){// check if file has any filename
- obj.filename=obj["id"]+filesuffix;
- }
- else{obj.filename=helpfilename+filesuffix}
- var link="";
- if(obj["link"][0]){link=obj["link"][0]} else{link=obj["link"]["4"]}
- xhr.setUrl(Qt.resolvedUrl(link));
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setFilename(login.imagestore+'albums/'+obj.album+"/"+obj["filename"]);
- xhr.setDownloadtype("picture");
- xhr.download();
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var result = tx.executeSql('SELECT * from imageData where id = "'+obj["id"]+'"');
- if(result.rows.length === 1) {// use update
- result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+obj.id+'", created="'+obj.created+'", edited="'+obj.edited+'", profile="'+obj.profile+'", link="'+obj["link"]["4"]+'", filename="'+obj.filename+'",title="'+obj.title+'", desc="'+obj.desc+'", type="'+obj.type+'", width="'+obj.width+'", height="'+obj.height+'", album="'+obj.album+'", location="file://'+login.imagestore+'albums/'+obj.album+'/" where id="'+obj["id"]+'"');
- } else {// use insert print('... does not exists, create it')
- result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,obj.id,obj.created,obj.edited, obj.title, obj.desc, obj.album, obj.filename, obj.type, obj.height, obj.width,obj. profile,obj["link"]["4"],'file://'+login.imagestore+'albums/'+obj.album+"/"]);
- }
- })}}
- catch (e){print("Data retrieval failure! "+ e+obj);}
-})}
-
-function storeImagedata(login,database,imagedata,rootwindow) {
- // check if image exist and call download function
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var result = tx.executeSql('SELECT * from imageData where id = "'+imagedata["id"]+'"');
- if(result.rows.length === 1) {// use update
- result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+imagedata.id+'", created="'+imagedata.created+'", edited="'+imagedata.edited+'", profile="'+imagedata.profile+'", link="'+imagedata.link[0]+'", filename="'+imagedata.filename+'",title="'+imagedata.title+'", desc="'+imagedata.desc+'", type="'+imagedata.type+'", width="'+imagedata.width+'", height="'+imagedata.height+'", album="'+imagedata.album+'", location="file://'+login.imagestore+'albums/'+imagedata.album+'/" where id="'+imagedata["id"]+'"');
- } else {// use insert print('... does not exists, create it')
- result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,imagedata.id,imagedata.created,imagedata.edited, imagedata.title, imagedata.desc, imagedata.album, imagedata.filename, imagedata.type, imagedata.height, imagedata.width,imagedata. profile,imagedata.link[0],'file://'+login.imagestore+'albums/'+imagedata.album+"/"]);
- }
-})}
-
-function deleteImage(database,login,type,location,filesystem,rootwindow,callback) { // delete image locally and on server
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- var rsfilename=location.substring(location.lastIndexOf("/")+1,location.length);
- var rslocation=location.substring(0,location.lastIndexOf("/")+1);
- //print(type+" Name "+ rsfilename+" Location: "+rslocation)
- db.transaction( function(tx) {
- if (type=='image'){
- var rs= tx.executeSql('SELECT * FROM imageData WHERE filename="'+rsfilename+'" AND location="'+rslocation+'"')
- var imageId=rs.rows.item(0).id;
- Helperjs.friendicaPostRequest(login,"/api/friendica/photo/delete?photo_id="+imageId,"","DELETE",rootwindow, function (obj){
- //var deletereturn = JSON.parse(obj); print(obj);
- //if (deletereturn.result=="deleted"){
- db.transaction( function(tx) {
- var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+rslocation+'" AND filename="'+rsfilename+'"'); });
- filesystem.Directory=rslocation.substring(7,rslocation.length-1);
- filesystem.rmFile(rsfilename)
- //}
- })
- }
- else{
- Helperjs.friendicaPostRequest(login,"/api/friendica/photoalbum/delete?album="+rsfilename,"","DELETE",rootwindow, function (obj){
- //var deletereturn = JSON.parse(obj);
- //if (deletereturn.result=="deleted"){
- db.transaction( function(tx) {
- var rs= tx.executeSql('SELECT DISTINCT location FROM imageData WHERE album="'+rsfilename+'" AND username="'+login.username+'"');
- var locationstring=rs.rows.item(0).location;
- filesystem.Directory=locationstring.substring(7,locationstring.length-1);
- filesystem.rmDir();
- var deleters=tx.executeSql('DELETE FROM imageData WHERE album="'+location+'"');
- })
- //}
- })
- }
- callback(location)
- })
-}
-
-function updateImage(database,login,type,filesystem,imageId,rootwindow,callback) { // delete image locally and on server
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- Helperjs.readData(database,"imageData",login.username,function(obj){
- db.transaction( function(tx) {
- if (type=='image'){
- var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+obj[0].location+'" AND filename="'+obj[0].filename+'"');
- filesystem.Directory=obj[0].location
- filesystem.rmFile(obj[0].filename)
- }
- })
- },"id",imageId);
- callback()
-}
-
-
-function deleteContacts(database,user,callback) { // does nothing useful at the moment
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- //print(' delete Image Data() for ' + field +"="+selection)
- db.transaction( function(tx) {
- result1= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
- result2= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
- callback(result)})
-}
-
-//function requestFriendsAlbumPictures(login,friend,rootwindow,callback){
-//// screenscraping of albums page of contact without user and password
-// Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
-// //print(photohtml);
-// var photoarray=[];
-// var arr = photohtml.split("sidebar-photos-albums-li");
-// for (var i=2;i')-1);
-// var album={'link':albumlink,'name':albumname}
-// photoarray.push(album);
-// }
-// callback(photoarray)
-// })
-//}
-
-function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){
-// screenscraping of albums page of contact with remoteAuth
- Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
- try {var obj=JSON.parse(photohtml);
- if (obj.hasOwnProperty('status')){
- Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
- getAlbumFromHtml(photohtml,false,rootwindow,callback)})
- }}
- catch (e){
- getAlbumFromHtml(photohtml,true,rootwindow,callback)
- }
- })
-}
-
-function getAlbumFromHtml(photohtml,remoteAuthBool,rootwindow,callback){
- var photoarray=[];
- var arr = photohtml.split("sidebar-photos-albums-li");
- for (var i=2;i')-1);
- var album={'link':albumlink,'name':albumname}//print(albumlink+" "+albumname);
- photoarray.push(album);
- }
- callback(photoarray,remoteAuthBool)
-}
-
-
-function newRequestFriendsPictures(login,link,friend,remoteAuthBool,remoteauth,rootwindow,callback){
-// screenscraping of pictures page for given album
- if (remoteAuthBool){
- remoteauth.setUrl(login.server);
- remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
- remoteauth.setContacturl(friend.url);
- Helperjs.friendicaRemoteAuthRequest(login,link,friend.url,rootwindow,function(photohtml){
- getPictureFromHtml(photohtml,remoteAuthBool,function(photoarray){
- callback(photoarray)
- })
- })}
- else{
- Helperjs.friendicaWebRequest(link,rootwindow,function(photohtml){
- getPictureFromHtml(photohtml,remoteAuthBool,function(photoarray){
- callback(photoarray)
- })
- })
- }
-}
-
-function getPictureFromHtml(photohtml,remoteAuthBool,callback){
- var photoarray=[];
- var basehtml=photohtml.substring(photohtml.indexOf('',photohtml.indexOf('-1){ //theme 1
- var arr = photohtml.split("photo-album-image-wrapper-end");}
-
-// other themes
- if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
- var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
- var arr = photoarea.split("");}
- //print("Url: "+login.server+ "Contacturl: "+friend.url)
-// remoteauth.setUrl(login.server);
-// remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
-// remoteauth.setContacturl(friend.url);
- for (var i=0;i',photohtml.indexOf('-1){ //theme 1
- var arr = photohtml.split("photo-album-image-wrapper-end");}
-
-// other themes
- if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
- var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
- var arr = photoarea.split("");}
-
- for (var i=0;i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-function showFriends(db) {
- Service.readActiveConfig(db,function(login){
- Service.requestFriends(login.url,login.user,login.password,displayFriends);
- });
-}
-function displayFriends(obj){
- for (var i=0; i= c.x)
- f.contentX = c.x;
- else if (f.contentX+f.width <= c.x+c.width)
- f.contentX = c.x+c.width-f.width;
- if (f.contentY >= c.y)
- f.contentY = c.y;
- else if (f.contentY+f.height <= c.y+c.height)
- f.contentY = c.y+c.height-f.height;
-}
-
-function createObject(objectQml,qmlParameters,parentitem,callback) {
- var component = Qt.createComponent(objectQml);
- if (component.status === Component.Ready || component.status === Component.Error)
- finishCreation(component,qmlParameters,parentitem,callback);
- else
- component.statusChanged.connect(finishCreation(qmlParameters));
-}
-
-function finishCreation(component,qmlParameters,parentitem,callback) {
- if (component.status === Component.Ready) {
- var createdObject = component.createObject(parentitem, qmlParameters);
- if (createdObject === null)
- print("Error creating image"); }
- else if (component.status === Component.Error)
- print("Error loading component:"+component.errorString());
- else {print("created")}
- //callback(createdObject);
-}
-
diff --git a/source-android/js/news.js b/source-android/js/news.js
deleted file mode 100644
index a827f11..0000000
--- a/source-android/js/news.js
+++ /dev/null
@@ -1,580 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-.import "qrc:/js/helper.js" as Helperjs
-
-function requestFriends(login,database,rootwindow,callback){
-// return array of friends
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var result = tx.executeSql('UPDATE contacts SET isFriend=0 where username="'+login.username+'"')}); // clean old friends
- Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
- var friends=JSON.parse(obj);
- for (var i=0;i0'+filtertext);
- //print('SELECT * from contacts WHERE username="'+login.username+'"'+filtertext);
- var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend>0'+filtertext);
- // check for friends
- var contactlist=[];
- for (var i=0;i'+lastDate);
- var result2 = tx.executeSql('SELECT url from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge > '+lastDate);
- for (var j=0;j0){
- for (var j=0;j0){
- for (var k=0;j0){var helpernews=newsrs.rows.item(0);
- var newscount=newsrs.rows.length;
- helpernews=fetchUsersForNews(database,user,helpernews,allcontacts);
- helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
- helpernews.text=Qt.atob(helpernews.text);
- helpernews.id=helpernews.status_id;
- if (helpernews.attachments!="" && helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
- callback(helpernews,newscount);}
-// var conversationobject={news:helpernews,newscount:newscount};
-// return conversationobject;
-})}
-
-
-
-
-function getAllContacts(database,user){
- var allcontacts=[];
- Helperjs.readData(database,"contacts",user,function(obj){
- allcontacts=obj;
- for (var n in allcontacts){
- allcontacts[n].name=Qt.atob(allcontacts[n].name);
- allcontacts[n].description=Qt.atob(allcontacts[n].description)
- }
- });
- return allcontacts;
-}
-
-function inArray(list, prop, val) {
- if (list.length > 0 ) {
- for (var i in list) {if (list[i][prop] == val) {
- return true;
- }
- }
- } return false;
-}
-
-function objFromArray(list, prop, val) {
- if (list.length > 0 ) {
- for (var i in list) {if (list[i][prop] == val) {
- return list[i];
- }
- }
- } return false;
-}
-
-function cleanDate(date){
- var cleanedDate= date.slice(0,3)+", "+date.slice(8,11)+date.slice(4,7)+date.slice(25,30)+date.slice(10,25);
- return cleanedDate
-}
diff --git a/source-android/js/newsworker.js b/source-android/js/newsworker.js
deleted file mode 100644
index 1be2bda..0000000
--- a/source-android/js/newsworker.js
+++ /dev/null
@@ -1,198 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-function findend (text, startpos) {
- var indexOf = text.substring(startpos || 0).search(/\s/);
- return (indexOf >= 0) ? (indexOf + (startpos || 0)) : text.length;
-}
-
-
-WorkerScript.onMessage = function(msg) {
-if(msg.deleteId!==undefined)
- {msg.model.remove(msg.deleteId);
- msg.model.sync()
-}
-else{
- if(msg.method=="refresh"){msg.model.clear()};
- msg.model.sync()
- for (var j=0;j0){
- if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")}
- else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")}
- }
- if (newsitemobject.friendica_activities.dislike.length>0){
- if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")}
- else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")}
- }
- if (newsitemobject.friendica_activities.attendyes.length>0){
- if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")}
- else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")}
- }
- if (newsitemobject.friendica_activities.attendno.length>0){
- if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")}
- else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")}
- }
- if (newsitemobject.friendica_activities.attendmaybe.length>0){
- if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")}
- else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")}
- }
- //var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
- if (newsitemobject.hasOwnProperty("friendica_activities_self")){
- if (newsitemobject.friendica_activities_self.indexOf(3)!=-1){self.attending=qsTr("yes")}
- if (newsitemobject.friendica_activities_self.indexOf(4)!=-1){self.attending=qsTr("no")}
- if (newsitemobject.friendica_activities_self.indexOf(5)!=-1){self.attending=qsTr("maybe")}
- if (newsitemobject.friendica_activities_self.indexOf(1)!=-1){self.liked=1}
- if (newsitemobject.friendica_activities_self.indexOf(2)!=-1){self.disliked=1}
- }}} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))}
- var friendica_activities={likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText,self:self}
- var attachmentList=[];
- var videoformats=["mp4", "avi", "webm","ogg","mp3"]
- try{if(newsitemobject.attachments){
- var attachArray=newsitemobject.attachments;
- for (var image in attachArray){
- var attachhelper={mimetype:attachArray[image].mimetype}
- var attachhelperstring=Qt.btoa(attachArray[image].url)
- var helperstringposition=newsitemobject.statusnet_html.indexOf(attachhelperstring);
- if (helperstringposition>-1){attachhelper.url=newsitemobject.statusnet_html.substring(newsitemobject.statusnet_html.lastIndexOf("http",helperstringposition),helperstringposition+attachhelperstring.length);
- if (attachArray[image].mimetype=="image/jpeg"){attachhelper.url=attachhelper.url+".jpg"}
- else if (attachArray[image].mimetype=="image/gif"){attachhelper.url=attachhelper.url+".gif"}
- else if (attachArray[image].mimetype=="image/png"){attachhelper.url=attachhelper.url+".png"}
- }
- else {attachhelper.url=attachArray[image].url}
- attachmentList.push(attachhelper)
- //print("Attachhelper "+attachhelper.url)
- newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url,"")
- newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4)+".jpeg","")
- newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4),"")
- }
- }
- }catch(e){print("attachment "+e)}
- for (var format in videoformats){
- if (newsitemobject.text.indexOf("."+videoformats[format])>-1){
- var videohelper={mimetype:"video/"+videoformats[format]}
- var videotext=newsitemobject.text;
- while (videotext.indexOf("."+videoformats[format])>-1){
- var videohelperstringposition=videotext.indexOf("."+videoformats[format]);
- videohelper.url=videotext.substring(videotext.lastIndexOf("http",videohelperstringposition),videohelperstringposition+4);
- videotext=videotext.substring(videohelperstringposition+4,videotext.length)
- if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=videohelper.url)){attachmentList.push(videohelper)}
- }
- }
- }
- if (newsitemobject.text.indexOf("/videos/watch/")>-1){
- var ptvideohelper={mimetype:"video/mp4"}
- var ptvideotext=newsitemobject.text;
- while (ptvideotext.indexOf("/videos/watch/")>-1){
- var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/");
- var ptposend=findend(ptvideotext,ptvideohelperstringposition);
- if(ptposend==-1){ptposend=ptvideotext.length};
- ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4";
- ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed");
- ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length)
- if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ptvideohelper.url)){attachmentList.push(ptvideohelper)}
- }
- }
-// if (newsitemobject.text.indexOf("https://www.youtube.com/watch")>-1){
-// //print("message "+msg.options.showWebsiteForLinks);
-// if (msg.options.showYoutube!="false"){
-// var ythelper={mimetype:"video/youtube"}
-// var yttext=newsitemobject.text;
-// while (yttext.indexOf("https://www.youtube.com/watch")>-1){
-// var ythelperstringposition=linktext.indexOf("watch?v=");
-// var ytposend=findend(yttext,ythelperstringposition);
-// ythelper.url=yttext.substring(yttext.lastIndexOf("http",linkhelperstringposition),linkposend);
-// linktext=linktext.substring(linkhelperstringposition+5,linktext.length)
-// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)}
-// }
-// }
-// }
-
-// if (newsitemobject.text.indexOf(".html")>-1){
-// //print("message "+msg.options.showWebsiteForLinks);
-// if (msg.options.showWebsiteForLinks!="false"){
-// var linkhelper={mimetype:"text/html"}
-// var linktext=newsitemobject.text;
-// while (linktext.indexOf(".html")>-1){
-// var linkhelperstringposition=linktext.indexOf(".html");
-// var linkposend=findend(linktext,linkhelperstringposition);
-// linkhelper.url=linktext.substring(linktext.lastIndexOf("http",linkhelperstringposition),linkposend);
-// linktext=linktext.substring(linkhelperstringposition+5,linktext.length)
-// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)}
-// }
-// }
-// }
-
- newsitemobject.attachmentList=attachmentList;
- var seconds=(msg.currentTime-newsitemobject.created_at)/1000;
- var timestring="";
- if (seconds<60) {timestring=seconds+" "+qsTr("seconds") +" "+qsTr("ago");}
- else if (seconds<90){timestring=Math.round(seconds/60)+" "+qsTr("minute") +" "+qsTr("ago");}
- else if (seconds<3600){timestring=Math.round(seconds/60)+" "+qsTr("minutes") +" "+qsTr("ago");}
- else if (seconds<5400){timestring=Math.round(seconds/3600)+" "+qsTr("hour") +" "+qsTr("ago");}
- else if (seconds<86400){timestring=Math.round(seconds/3600)+" "+qsTr("hours") +" "+qsTr("ago");}
- else if (seconds<129600){timestring=Math.round(seconds/86400)+" "+qsTr("day") +" "+qsTr("ago");}
- else if (seconds<3888000){timestring=Math.round(seconds/86400)+" "+qsTr("days") +" "+qsTr("ago");}
- else if (seconds<5832000){timestring=Math.round(seconds/3888000)+" "+qsTr("month") +" "+qsTr("ago");}
- else if (seconds<69984000){timestring=Math.round(seconds/3888000)+" "+qsTr("months") +" "+qsTr("ago");}
- else {timestring=Math.round(seconds/46656000)+" "+qsTr("years") +" "+qsTr("ago");}
-
- var data=({"newsitemobject": newsitemobject,"dateDiff":timestring,"friendica_activities":friendica_activities,"forumname":forumname})}
- //print("News:"+j+msg.news.length+JSON.stringify(data));
- if(msg.method=="append") {
- msg.model.insert(j, data)}
- else{
- msg.model.append(data)}
- }
-
- if (j==msg.news.length){
- //print("j: "+j+" msg.model.count: "+msg.model.count);
- msg.model.sync()
- }
-}
-}
diff --git a/source-android/js/photoworker.js b/source-android/js/photoworker.js
deleted file mode 100644
index 029c78e..0000000
--- a/source-android/js/photoworker.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-WorkerScript.onMessage = function(msg) {
- if (msg.firstalbum==0){msg.model.clear();}
- var contact={}; try{contact=msg.friend}catch(e){print(e)}
- var limit=0; if (msg.albums.length-msg.firstalbum<20){limit=msg.albums.length} else{limit=msg.firstalbum+20}
- for (var j=msg.firstalbum;j
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-//.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-.import "qrc:/js/helper.js" as Helperjs
-.import "qrc:/js/news.js" as Newsjs
-
-// CONFIG FUNCTIONS
-
-function initDatabase(database) { // initialize the database object
- var db =Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- //print('initDatabase()'+database[0]+database[1]+database[2]+database[3])
- db.transaction( function(tx) {
- //var version=tx.executeSql('PRAGMA user_version');print(JSON.stringify(version.rows.item(0)))
- tx.executeSql('CREATE TABLE IF NOT EXISTS imageData(username TEXT,id INT, created TEXT,edited TEXT, title TEXT, desc TEXT, album TEXT,filename TEXT, type TEXT, height INT, width INT, profile INT, link TEXT,location TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS config(server TEXT, username TEXT, password TEXT, imagestore TEXT, maxnews INT, timerInterval INT, newsViewType TEXT,isActive INT, permissions TEXT,maxContactAge INT,APIVersion TEXT,layout TEXT, addons TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS news(username TEXT, messagetype INT, text TEXT, created_at INT, in_reply_to_status_id INT, source TEXT, status_id INT, in_reply_to_user_id INT, geo TEXT,favorited TEXT, uid INT, statusnet_html TEXT, statusnet_conversation_id TEXT,friendica_activities TEXT, friendica_activities_self TEXT, attachments TEXT, friendica_owner TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS contacts(username TEXT, id INT, name TEXT, screen_name TEXT, location TEXT,imageAge INT, profile_image_url TEXT, description TEXT, profile_image BLOB, url TEXT, protected TEXT, followers_count INT, friends_count INT, created_at INT, favourites_count TEXT, utc_offset TEXT, time_zone TEXT, statuses_count INT, following TEXT, verified TEXT, statusnet_blocking TEXT, notifications TEXT, statusnet_profile_url TEXT, cid INT, network TEXT, isFriend INT, timestamp INT)');
-// tx.executeSql('CREATE INDEX IF NOT EXISTS contact_id ON contacts(id)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS profiles(username TEXT, id INT, profiledata TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS groups(username TEXT, groupname TEXT, gid INT, members TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS events(username TEXT, id INT, start INT, end INT, allday INT, title TEXT, j INT, d TEXT, isFirst INT, uid INT, cid INT, uri TEXT, created INT, edited INT, desc TEXT, location TEXT, type TEXT, nofinish TEXT, adjust INT, ignore INT, permissions TEXT, guid INT, itemid INT, plink TEXT, authorName TEXT, authorAvatar TEXT, authorLink TEXT, html TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS globaloptions(k TEXT, v TEXT)')
-})}
-
-function cleanPermissions(oldperms){
- var newperms=oldperms.replace("<","");newperms=newperms.replace(">","");newperms="["+newperms+"]";
- var newpermArray=JSON.parse(newperms);
-return (newpermArray)
-}
-
-function getEvents(database,login,rootwindow,callback){
-var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- Helperjs.friendicaWebRequest(login.server+"/cal/"+login.username+"/json",rootwindow,function(obj){
- //Helperjs.friendicaRemoteAuthRequest(login,login.server+"/cal/"+login.username+"/json",login.server+"/profile/"+login.username,rootwindow,function(obj){
- var events = JSON.parse(obj);
- db.transaction( function(tx) {
- for (var i=0;i0){
- for(var i = 0; i < rs.rows.length; i++) {
- rsArray.push(rs.rows.item(i))
- }
- var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons};
- } else {var rsObject=""}
- callback(rsObject)}}
- )
-}
-
-function readActiveConfig(database){
- var obj;
- readConfig(database,function(config){obj=config},"isActive", 0);
- return obj;
-}
-
-function readGlobaloptions(database,callback){
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- var go=({});
- db.transaction( function(tx) {
- var rs = tx.executeSql('select * from globaloptions');
- for (var r=0; r0){ maxnews=maxnewsrs.rows.item(0).v};
- var newscountrs = tx.executeSql('SELECT COUNT(*) from news');
- var newscount = newscountrs.rows.item(0)["COUNT(*)"];//print("newscount "+newscount)
- if (newscount>maxnews){
- var lastvalidtimers= tx.executeSql('SELECT DISTINCT created_at FROM news ORDER BY created_at ASC LIMIT ' +(newscount-maxnews));
- var lastvalidtime=lastvalidtimers.rows.item(newscount-maxnews-1).created_at;
- var deleters = tx.executeSql('DELETE from news WHERE created_at<='+lastvalidtime)}
- callback()
- })
- }
-
-function cleanContacts(login,database,callback){
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var oldestnewsrs= tx.executeSql('SELECT created_at FROM news WHERE username="'+login.username+'" AND messagetype=0 ORDER BY created_at ASC LIMIT 1');
- if (oldestnewsrs.rows.length>0){ var oldestnewsTime=oldestnewsrs.rows.item(0).created_at- 604800000;} else{var oldestnewsTime=0} //contacts can be 7 days old
- //print(login.username+" älteste news: "+ oldestnewsTime);
- var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge<'+oldestnewsTime); // check for friends
- //print ("Contact result length: "+ result.rows.length)
- for (var i=0;i-1){contacttimer.start()}
- }
-
-}
-
-
-function cleanUser(user){
- user.created_at=Date.parse(Newsjs.cleanDate(user.created_at));
- var imagehelper1=user.profile_image_url.split("?");
- var imagehelper2=imagehelper1[0].substring(imagehelper1[0].lastIndexOf("/")+1,imagehelper1[0].length);
- var imagehelper3=login.imagestore+"contacts/"+user.screen_name+"-"+imagehelper2
- if(filesystem.fileexist(imagehelper3)){user.profile_image=imagehelper3}else {user.profile_image=""}
- return user
-}
-
-function updateView(viewtype){
- //messageSend.state="";
- //newsBusy.running=true;
- //downloadNotice.text="xhr start "+Date.now()
- switch(viewtype){
- case "Conversations":
- Newsjs.getLastNews(login,db,function(lastnews){
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/friends_timeline");
- xhr.clearParams();
- xhr.setParam("since_id",lastnews);
- xhr.setParam("count",50)});
- break;
- case "Timeline":
- var lastnews=Newsjs.getLastNews(login,db,function(lastnews){
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/friends_timeline");
- xhr.clearParams();
- xhr.setParam("since_id",lastnews);
- xhr.setParam("count",50)
- });
- break;
- case "Search":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/search");
- break;
- case "Notifications":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/friendica/notifications");
- xhr.clearParams();
- break;
- case "Direct Messages":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/direct_messages/all");
- xhr.clearParams();
- break;
- case "Public Timeline":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/public_timeline");
- xhr.clearParams();
- break;
- case "Favorites":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/favorites");
- xhr.clearParams();
- break;
- case "Replies":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/replies");
- xhr.clearParams();
- break;
- default:
- Newsjs.getLastNews(login,db,function(lastnews){
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/friends_timeline");
- xhr.clearParams();
- xhr.setParam("since_id",lastnews);
- xhr.setParam("count",50)
- newstab.newstabstatus="Conversations";
- });
- }
-
- xhr.get();
- if (viewtype==="Conversations"){Newsjs.allchatsfromdb(db,login.username,function(temp){
- newsStack.allchats=temp
- })}
-}
-
-function showGroups(){
- Helperjs.readData(db,"groups",login.username,function(groups){
- var groupitems="";
- for (var i=0;i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-
-var html=[//Smileys
- '\u263A',
- '\u2639',
- '\u263B',
- //Weather
- '\u2600',
- '\u2601',
- '\u263C',
- '\u2614',
- '\u2602',
- '\u2603',
- '\u2604',
- '\u26C4',
- '\u26C5',
- '\u26C8',
- //Leisure
- '\u2615',
- '\u26BD',
- '\u26BE',
- '\u26F1',
- '\u26F2',
- '\u26F3',
- '\u26F4',
- '\u26F5',
- '\u26F7',
- '\u26F8',
- '\u26F9',
- '\u26FA',
- '\u26FD',
- //Hand
- '\u261C',
- '\u261D',
- '\u261E',
- '\u261F',
- '\u2620',
- '\u2622',
- '\u2623',
- //Religion
- '\u2626',
- '\u262A',
- '\u262C',
- '\u262E',
- '\u262F',
- '\u26EA',
- '\u26E9'
-]
-
-var core=[
-{name:'<3',url:
-'qrc:///images/smileys/core/smiley-heart.gif'},
-
-{name:'</3',url:
-'qrc:///images/smileys/core/smiley-brokenheart.gif'},
-
-{name:':-)',url:
-'qrc:///images/smileys/core/smiley-smile.gif'},
-
-{name:';-)',url:
-'qrc:///images/smileys/core/smiley-wink.gif'},
-
-{name:':-(',url:
-'qrc:///images/smileys/core/smiley-frown.gif'},
-
-{name:':-P',url:
-'qrc:///images/smileys/core/smiley-tongue-out.gif'},
-
-{name:':-X',url:
-'qrc:///images/smileys/core/smiley-kiss.gif'},
-
-{name:':-D',url:
-'qrc:///images/smileys/core/smiley-laughing.gif'},
-
-{name:':-O',url:
-'qrc:///images/smileys/core/smiley-surprised.gif'},
-
-{name:'\\o/',url:
-'qrc:///images/smileys/core/smiley-thumbsup.gif'},
-
-{name:'o.O',url:
-'qrc:///images/smileys/core/smiley-Oo.gif'},
-
-{name:":'(",url:
-'qrc:///images/smileys/core/smiley-cry.gif'},
-
-{name:":-!",url:
-'qrc:///images/smileys/core/smiley-foot-in-mouth.gif'},
-
-{name:":-/",url:
-'qrc:///images/smileys/core/smiley-undecided.gif'},
-
-{name:":-[",url:
-'qrc:///images/smileys/core/smiley-embarassed.gif'},
-
-{name:"8-)",url:
-'qrc:///images/smileys/core/smiley-cool.gif'},
-
-{name:':beer',url:
-'qrc:///images/smileys/core/beer_mug.gif'},
-
-{name:':coffee',url:
-'qrc:///images/smileys/core/coffee.gif'},
-
-{name:':facepalm',url:
-'qrc:///images/smileys/core/smiley-facepalm.gif'},
-
-{name:':like',url:
-'qrc:///images/smileys/core/like.gif'},
-
-{name:':dislike',url:
-'qrc:///images/smileys/core/dislike.gif'},
-
-{name:'~friendica',url:
-'qrc:///images/smileys/core/friendica-16.png'},
-
-{name:'red#',url:
-'qrc:///images/smileys/core/rm-16.png'}
-]
-
-
-var addon=[
-{name:':bunnyflowers',url:
-'qrc:///images/smileys/animals/bunnyflowers.gif'},
-
- {name:':chick',url:
-'qrc:///images/smileys/animals/chick.gif'},
-
- {name:':bumblebee',url:
-'qrc:///images/smileys/animals/bee.gif'},
-
- {name:':ladybird',url:
-'qrc:///images/smileys/animals/ladybird.gif'},
-
- {name:':bigspider',url:
-'qrc:///images/smileys/animals/bigspider.gif' },
-
- {name:':cat',url:
-'qrc:///images/smileys/animals/cat.gif'},
-
- {name:':bunny',url:
-'qrc:///images/smileys/animals/bunny.gif' },
-
- {name:':cow',url:
-'qrc:///images/smileys/animals/cow.gif' },
-
- {name:':crab',url:
-'qrc:///images/smileys/animals/crab.gif' },
-
- {name:':dolphin',url:
-'qrc:///images/smileys/animals/dolphin.gif' },
-
- {name:':dragonfly',url:
-'qrc:///images/smileys/animals/dragonfly.gif' },
-
- {name:':frog',url:
-'qrc:///images/smileys/animals/frog.gif'},
-
- {name:':hamster',url:
-'qrc:///images/smileys/animals/hamster.gif' },
-
- {name:':monkey',url:
-'qrc:///images/smileys/animals/monkey.gif' },
-
- {name:':horse',url:
-'qrc:///images/smileys/animals/horse.gif' },
-
- {name:':parrot',url:
-'qrc:///images/smileys/animals/parrot.gif' },
-
- {name:':tux',url:
-'qrc:///images/smileys/animals/tux.gif' },
-
- {name:':snail',url:
-'qrc:///images/smileys/animals/snail.gif' },
-
- {name:':sheep',url:
-'qrc:///images/smileys/animals/sheep.gif' },
-
- {name:':dog',url:
-'qrc:///images/smileys/animals/dog.gif'},
-
- {name:':elephant',url:
-'qrc:///images/smileys/animals/elephant.gif' },
-
- {name:':fish',url:
-'qrc:///images/smileys/animals/fish.gif' },
-
- {name:':giraffe',url:
-'qrc:///images/smileys/animals/giraffe.gif' },
-
- {name:':pig',url:
-'qrc:///images/smileys/animals/pig.gif'},
-
-//Baby
-
- {name:':baby',url:
-'qrc:///images/smileys/babies/baby.gif' },
-
- {name:':babycot',url:
-'qrc:///images/smileys/babies/babycot.gif' },
-
-
- {name:':pregnant',url:
-'qrc:///images/smileys/babies/pregnant.gif' },
-
- {name:':stork',url:
-'qrc:///images/smileys/babies/stork.gif' },
-
-
-//Confused
- {name:':confused',url:
-'qrc:///images/smileys/confused/confused.gif' },
-
- {name:':shrug',url:
-'qrc:///images/smileys/confused/shrug.gif' },
-
- {name:':stupid',url:
-'qrc:///images/smileys/confused/stupid.gif' },
-
- {name:':dazed',url:
-'qrc:///images/smileys/confused/dazed.gif' },
-//Cool 'qrc:///images/smileys
-
- {name:':affro',url:
-'qrc:///images/smileys/cool/affro.gif'},
-
-//Devil/Angel
-
- {name:':angel',url:
-'qrc:///images/smileys/devilangel/angel.gif'},
-
- {name:':cherub',url:
-'qrc:///images/smileys/devilangel/cherub.gif'},
-
- {name:':devilangel',url:
-'qrc:///images/smileys/devilangel/blondedevil.gif' },
- {name:':catdevil',url:
-'qrc:///images/smileys/devilangel/catdevil.gif'},
-
- {name:':devillish',url:
-'qrc:///images/smileys/devilangel/devil.gif'},
-
- {name:':daseesaw',url:
-'qrc:///images/smileys/devilangel/daseesaw.gif'},
-
- {name:':turnevil',url:
-'qrc:///images/smileys/devilangel/turnevil.gif' },
-
- {name:':saint',url:
-'qrc:///images/smileys/devilangel/saint.gif'},
-
- {name:':graveside',url:
-'qrc:///images/smileys/devilangel/graveside.gif'},
-
-//Unpleasent
-
- {name:':toilet',url:
-'qrc:///images/smileys/disgust/toilet.gif'},
-
- {name:':fartinbed',url:
-'qrc:///images/smileys/disgust/fartinbed.gif' },
-
- {name:':fartblush',url:
-'qrc:///images/smileys/disgust/fartblush.gif' },
-
-//Drinks
-
- {name:':tea',url:
-'qrc:///images/smileys/drink/tea.gif' },
-
- {name:':drool',url:
-'qrc:///images/smileys/drool/drool.gif'},
-
-//Sad
-
- {name:':crying',url:
-'qrc:///images/smileys/sad/crying.png'},
-
- {name:':prisoner',url:
-'qrc:///images/smileys/sad/prisoner.gif' },
-
- {name:':sigh',url:
-'qrc:///images/smileys/sad/sigh.gif'},
-
-//Smoking - only one smiley in here, maybe it needs moving elsewhere?
-
- {name:':smoking',url:
-'qrc:///images/smileys/smoking/smoking.gif'},
-
-//Sport
-
- {name:':basketball',url:
-'qrc:///images/smileys/sport/basketball.gif'},
-
- {name:':bowling',url:
-'qrc:///images/smileys/sport/bowling.gif'},
-
- {name:':cycling',url:
-'qrc:///images/smileys/sport/cycling.gif'},
-
- {name:':darts',url:
-'qrc:///images/smileys/sport/darts.gif'},
-
- {name:':fencing',url:
-'qrc:///images/smileys/sport/fencing.gif' },
-
- {name:':juggling',url:
-'qrc:///images/smileys/sport/juggling.gif'},
-
- {name:':skipping',url:
-'qrc:///images/smileys/sport/skipping.gif'},
-
- {name:':archery',url:
-'qrc:///images/smileys/sport/archery.gif'},
-
- {name:':surfing',url:
-'qrc:///images/smileys/sport/surfing.gif' },
-
- {name:':snooker',url:
-'qrc:///images/smileys/sport/snooker.gif' },
-
- {name:':horseriding',url:
-'qrc:///images/smileys/sport/horseriding.gif'},
-
-//Love
-
- {name:':iloveyou',url:
-'qrc:///images/smileys/love/iloveyou.gif'},
-
- {name:':inlove',url:
-'qrc:///images/smileys/love/inlove.gif'},
-
- {name:':~love',url:
-'qrc:///images/smileys/love/love.gif' },
-
- {name:':lovebear',url:
-'qrc:///images/smileys/love/lovebear.gif'},
-
- {name:':lovebed',url:
-'qrc:///images/smileys/love/lovebed.gif' },
-
- {name:':loveheart',url:
-'qrc:///images/smileys/love/loveheart.gif' },
-
-//Tired/Sleep
-
- {name:':countsheep',url:
-'qrc:///images/smileys/tired/countsheep.gif' },
-
- {name:':hammock',url:
-'qrc:///images/smileys/tired/hammock.gif'},
-
- {name:':pillow',url:
-'qrc:///images/smileys/tired/pillow.gif' },
-
- {name:':yawn',url:
-'qrc:///images/smileys/tired/yawn.gif'},
-
-//Fight/Flame/Violent
-
- {name:':2guns',url:
-'qrc:///images/smileys/fight/2guns.gif' },
-
- {name:':alienfight',url:
-'qrc:///images/smileys/fight/alienfight.gif' },
-
- {name:':army',url:
-'qrc:///images/smileys/fight/army.gif'},
-
- {name:':arrowhead',url:
-'qrc:///images/smileys/fight/arrowhead.gif'},
-
- {name:':bfg',url:
-'qrc:///images/smileys/fight/bfg.gif' },
-
- {name:':bowman',url:
-'qrc:///images/smileys/fight/bowman.gif' },
-
- {name:':chainsaw',url:
-'qrc:///images/smileys/fight/chainsaw.gif'},
-
- {name:':crossbow',url:
-'qrc:///images/smileys/fight/crossbow.gif'},
-
- {name:':crusader',url:
-'qrc:///images/smileys/fight/crusader.gif' },
-
- {name:':dead',url:
-'qrc:///images/smileys/fight/dead.gif' },
-
- {name:':hammersplat',url:
-'qrc:///images/smileys/fight/hammersplat.gif' },
-
- {name:':lasergun',url:
-'qrc:///images/smileys/fight/lasergun.gif' },
-
- {name:':machinegun',url:
-'qrc:///images/smileys/fight/machinegun.gif' },
-
- {name:':acid',url:
-'qrc:///images/smileys/fight/acid.gif' },
-
-//Fantasy - monsters and dragons fantasy. The other type of fantasy belongs in adult
-
- {name:':alienmonster',url:
-'qrc:///images/smileys/fantasy/alienmonster.gif' },
-
- {name:':barbarian',url:
-'qrc:///images/smileys/fantasy/barbarian.gif' },
-
- {name:':dinosaur',url:
-'qrc:///images/smileys/fantasy/dinosaur.gif'},
-
- {name:':dragon',url:
-'qrc:///images/smileys/fantasy/dragon.gif'},
-
- {name:':draco',url:
-'qrc:///images/smileys/fantasy/dragonwhelp.gif'},
-
- {name:':ghost',url:
-'qrc:///images/smileys/fantasy/ghost.gif'},
-
- {name:':mummy',url:
-'qrc:///images/smileys/fantasy/mummy.gif'},
-
-//Food
-
- {name:':apple',url:
-'qrc:///images/smileys/food/apple.gif' },
-
- {name:':broccoli',url:
-'qrc:///images/smileys/food/broccoli.gif' },
-
- {name:':cake',url:
-'qrc:///images/smileys/food/cake.gif'},
-
- {name:':carrot',url:
-'qrc:///images/smileys/food/carrot.gif' },
-
- {name:':popcorn',url:
-'qrc:///images/smileys/food/popcorn.gif'},
-
- {name:':tomato',url:
-'qrc:///images/smileys/food/tomato.gif'},
-
- {name:':banana',url:
-'qrc:///images/smileys/food/banana.gif'},
-
- {name:':cooking',url:
-'qrc:///images/smileys/food/cooking.gif'},
-
- {name:':fryegg',url:
-'qrc:///images/smileys/food/fryegg.gif'},
-
- {name:':birthdaycake',url:
-'qrc:///images/smileys/food/birthdaycake.gif'},
-
-//Happy
-
- {name:':cloud9',url:
-'qrc:///images/smileys/happy/cloud9.gif'},
-
- {name:':tearsofjoy',url:
-'qrc:///images/smileys/happy/tearsofjoy.gif' },
-
-//Repsect
-
- {name:':bow',url:
-'qrc:///images/smileys/respect/bow.gif'},
-
- {name:':bravo',url:
-'qrc:///images/smileys/respect/bravo.gif'},
-
- {name:':hailking',url:
-'qrc:///images/smileys/respect/hailking.gif'},
-
- {name:':number1',url:
-'qrc:///images/smileys/respect/number1.gif' },
-
-//Laugh
-
- {name:':hahaha',url:
-'qrc:///images/smileys/laugh/hahaha.gif'},
-
- {name:':loltv',url:
-'qrc:///images/smileys/laugh/loltv.gif' },
-
- {name:':rofl',url:
-'qrc:///images/smileys/laugh/rofl.gif'},
-
-//Music
-
- {name:':drums',url:
-'qrc:///images/smileys/music/drums.gif'},
-
-
- {name:':guitar',url:
-'qrc:///images/smileys/music/guitar.gif'},
-
- {name:':trumpet',url:
-'qrc:///images/smileys/music/trumpet.gif' },
-
-//smileys that used to be in core
-
- {name:':headbang',url:
-'qrc:///images/smileys/oldcore/headbang.gif'},
-
- {name:':beard',url:
-'qrc:///images/smileys/oldcore/beard.png'},
-
- {name:':whitebeard',url:
-'qrc:///images/smileys/oldcore/whitebeard.png'},
-
- {name:':shaka',url:
-'qrc:///images/smileys/oldcore/shaka.gif'},
-
- {name:':\\.../',url:
-'qrc:///images/smileys/oldcore/shaka.gif'},
-
- {name:':\\ooo/',url:
-'qrc:///images/smileys/oldcore/shaka.gif' },
-
- {name:':headdesk',url:
-'qrc:///images/smileys/oldcore/headbang.gif' },
-
-//These two are still in core, so oldcore isn't strictly right, but we don't want too many directories
-
- {name:':-d',url:
-'qrc:///images/smileys/oldcore/laughing.gif'},
-
- {name:':-o',url:
-'qrc:///images/smileys/oldcore/surprised.gif' },
-
-// Regex killers - stick these at the bottom so they appear at the end of the English and
-// at the start of $OtherLanguage.
-
- {name:':cool',url:
-'qrc:///images/smileys/cool/cool.gif' },
-
- {name:':vomit',url:
-'qrc:///images/smileys/disgust/vomit.gif' },
-
- {name:':golf',url:
-'qrc:///images/smileys/sport/golf.gif' },
-
- {name:':football',url:
-'qrc:///images/smileys/sport/football.gif'},
-
- {name:':tennis',url:
-'qrc:///images/smileys/sport/tennis.gif' },
-
- {name:':alpha',url:
-'qrc:///images/smileys/fight/alpha.png' },
-
- {name:':marine',url:
-'qrc:///images/smileys/fight/marine.gif' },
-
- {name:':sabre',url:
-'qrc:///images/smileys/fight/sabre.gif' },
-
- {name:':tank',url:
-'qrc:///images/smileys/fight/tank.gif' },
-
- {name:':viking',url:
-'qrc:///images/smileys/fight/viking.gif' },
-
- {name:':gangs',url:
-'qrc:///images/smileys/fight/gangs.gif' },
-
- {name:':dj',url:
-'qrc:///images/smileys/music/dj.gif'},
-
- {name:':elvis',url:
-'qrc:///images/smileys/music/elvis.gif'},
-
- {name:':violin',url:
-'qrc:///images/smileys/music/violin.gif'},
-]
-
-
-var adult=[
-{
-name:'(o)(o) ',url:
-'qrc:///images/smileys/adult/tits.gif'},
-
-{name:'(.)(.) ',url:
-'qrc:///images/smileys/adult/tits.gif'},
-
-{name:':bong',url:
-'qrc:///images/smileys/adult/bong.gif'},
-
-{name:':sperm',url:
-'qrc:///images/smileys/adult/sperm.gif'},
-
-{name:':drunk',url:
-'qrc:///images/smileys/adult/drunk.gif'},
-
-{name:':finger',url:
-'qrc:///images/smileys/adult/finger.gif'}
-]
diff --git a/source-android/js/yplayer.html b/source-android/js/yplayer.html
deleted file mode 100644
index 8222d36..0000000
--- a/source-android/js/yplayer.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- -1
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source-android/qml/calendarqml/CalendarTab.qml b/source-android/qml/calendarqml/CalendarTab.qml
deleted file mode 100644
index 10b4e78..0000000
--- a/source-android/qml/calendarqml/CalendarTab.qml
+++ /dev/null
@@ -1,174 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import QtQml 2.2
-import Qt.labs.calendar 1.0
-//import QtQuick.Controls 1.2 as Oldcontrol
-import QtQuick.Layouts 1.3
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/calendarqml"
-import "qrc:/qml/genericqml"
-
-Rectangle {
- id:calendarrectangle
-// y:1
-// width:root.width-mm
-// height:root.height-5*mm
- anchors.fill: parent
- color: '#fff'
- property date currentTime: new Date()
- property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
- property var events:[]
- property var eventdays:[]
- //onEventdaysChanged: print(JSON.stringify(eventdays))
-
- function showEvents(friend){
- if(friend=="backButton"){Service.eventsfromdb(db,login.username,function(eventArray,dayArray){
- events=eventArray;
- eventdays=dayArray})
- }
- else if (friend!=""){
- calendartab.calendartabstatus=friend.url.substring(friend.url.lastIndexOf("/")+1,friend.url.length)
- Service.newRequestFriendsEvents(login,friend,calendartab,function(eventArray,dayArray){
- events=eventArray;
- eventdays=dayArray})
- }
- else {calendartab.calendartabstatus="Events";
- Service.eventsfromdb(db,login.username,function(eventArray,dayArray){
- events=eventArray;
- eventdays=dayArray;
- calBusy.running=false
- })
- }
- }
-
- BusyIndicator{
- id: calBusy
- anchors.horizontalCenter: calendarView.horizontalCenter
- anchors.top:calendarView.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- running: false
- }
-
-
- MButton{
- id: updateEvents
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right:calendartabstatusButton.left
- anchors.rightMargin:mm
- height: 6*mm
- width: 8*mm
- text:"\uf021"
- onClicked: {
- Service.getEvents(db,login, calendartab,function(){
- showEvents("")
- })}}
-
- MButton{
- id: calendartabstatusButton
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right: parent.right
- anchors.rightMargin:2*mm
- height: 6*mm
- width: Math.max(10*mm,implicitWidth)
- text: calendartab.calendartabstatus=="Events"?qsTr("Events"):calendartabstatus
- Menu {
- id:calendartabmenu
- width: 40*mm
- MenuItem {
- text: qsTr("Own Calendar")
- font.pixelSize: 3*mm
- onTriggered: {
- calendartab.calendartabstatus="Events";
- // calendartabstatusButton.text=qsTr("own Calendar");
- showEvents("")}
- }
- }
- onClicked: {calendartabmenu.popup()}
- }
-
-
- ListView{
- id: calendarView
- x: mm;y:8*mm
- width: parent.width-2*mm; height: parent.height-9*mm
- clip: true
- snapMode: ListView.SnapOneItem
- orientation: ListView.Horizontal
- highlightRangeMode: ListView.StrictlyEnforceRange
- model: CalendarModel {id:calendarModel
- from: new Date()
- to: new Date(new Date().valueOf()+93312000000)
- }
- delegate:
- ColumnLayout{
- width:calendarView.width
- Text{
- font.bold: true
- Layout.fillWidth: true
- horizontalAlignment:Text.AlignHCenter
- text: model.year
- }
- Text{
- text: Qt.locale().standaloneMonthName(model.month)
- Layout.fillWidth: true
- horizontalAlignment:Text.AlignHCenter
- }
- DayOfWeekRow{
- locale: monthgrid.locale
- Layout.fillWidth: true
- font.pixelSize: 3*mm
- }
-
- MonthGrid {
- id: monthgrid
- Layout.fillWidth: true
- month: model.month
- year: model.year
- locale: Qt.locale()
- delegate: CalendarDay{}
- }
- }
- ScrollIndicator.horizontal: ScrollIndicator { }
- }
-
- Component.onCompleted: {
- root.eventSignal.connect(showEvents);
- if (calendartab.calendartabstatus=="Events"){showEvents("")}
- }
- }
diff --git a/source-android/qml/calendarqml/EventList.qml b/source-android/qml/calendarqml/EventList.qml
deleted file mode 100644
index 5028ae7..0000000
--- a/source-android/qml/calendarqml/EventList.qml
+++ /dev/null
@@ -1,117 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:eventList
- z:2
- border.color: "grey"
- width: parent.width-4*mm
- height:parent.height-12*mm
- x:mm
- y:mm
- property var daylist:[]
-
- MButton{
- id:closeButton
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- height: 6*mm
- width: 8*mm
- text: "\uf057"
- onClicked:{eventList.destroy()}
- }
- ListView {
- id: eventlistView
- x: mm
- y:closeButton.height+2*mm
- width: eventList.width-2*mm
- height: eventList.height-closeButton.height-4*mm
- clip: true
- model: eventModel
- delegate: eventItem
- }
-
- ListModel{
- id: eventModel
- }
-
- Component.onCompleted:{
- for (var i=0; i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.4
-
-import "qrc:/js/service.js" as Service
-import "qrc:/js/layout.js" as Layoutjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-Page{
- id:accountPage
- width: root.width
- height: root.height
- property var users:[]
- property var userdata: ({})
-
- function setServericon(server){
- try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
- var serverdata = JSON.parse(obj);
- servericon.visible=true;
- servericon.source=serverdata.site.logo})} catch(e){print(e)}
- }
-
- Button{
- id:userButton
- height: 8*mm
- text:qsTr("User")
- font.pixelSize: 3*mm
- x: mm
- y: mm
- width: root.width/2
- onClicked:{
- var useritems="";
- for (var i=0;i-1){
- Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),accountPage)
- }
- }
- }
- }
- Button {
- x: root.width-9*mm; y: 23.5*mm; width:5*mm; height:5*mm
- text: "\uf234"
- font.pixelSize: 3*mm
- onClicked: {
- configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}})
- }
- }
-
- Rectangle{
- color: "light grey"
- x: 4*mm; y: 33.5*mm; width: root.width-6*mm; height: 5*mm;
- TextInput {
- id: password
- anchors.fill: parent
- font.pixelSize:3*mm
- selectByMouse: true
- echoMode: TextInput.PasswordEchoOnEdit
- }
- }
-
- Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;}
- Flickable {
- id: imagestoreFlickable
- x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;
- clip: true
- TextInput {
- id: imagestore
- width: imagestoreFlickable.width
- height: imagestoreFlickable.height
- font.pixelSize:3*mm
- wrapMode: TextEdit.NoWrap
- onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
- }
- }
-
- FileDialog {
- id: imagestoreDialog
- title: "Please choose a directory"
- folder: shortcuts.pictures
- selectFolder: true
- onAccepted: {
- var imagestoreString=imagestoreDialog.folder.toString();
- imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
- imagestore.text=imagestoreString
- }
- }
-
- Button {
- x: root.width-9*mm; y: 43.5*mm; width: 5*mm; height: 5*mm;
- text: "..."
- font.pixelSize: 3*mm
- onClicked:
- {imagestoreDialog.open()}
- }
-
-
-// Slider{ id: maxNews
-// x:19*mm; y: 53.5*mm;width: root.width/2;height:5*mm
-// from: 0;to:2000; stepSize: 100
-// }
-
-
-// Rectangle{color: "light grey"; x: 4*mm; y: 53.5*mm; width: 9*mm; height: 5*mm;
-// TextEdit{id:maxNewsText;
-// anchors.fill: parent
-// font.pixelSize:3*mm
-// verticalAlignment:TextEdit.AlignRight
-// text:maxNews.value
-// focus: true
-// selectByMouse: true
-// }
-// }
-
- Rectangle{
- x: 4*mm; y: 53.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
- color:"light grey"
- Text{
- id: newsTypeField
- anchors.fill: parent
- font.pixelSize:3*mm
- text:"Conversations"
- }
- MouseArea{
- anchors.fill:parent
- onClicked:newstypemenu.popup()
- }
- }
-
- BusyIndicator{
- id: accountBusy
- anchors.horizontalCenter: parent.horizontalCenter
- y: 63.5*mm
- width:10*mm
- height: 10*mm
- running: false
- }
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- Button {
- x: 4*mm; y: 63.5*mm
- height: 8*mm
- text: qsTr("Confirm")
- font.pixelSize: 3*mm
- onClicked:{
- accountBusy.running=true;
- var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestore.text, maxnews:"",interval: "",newsViewType:newsTypeField.text};
- var errormessage="";
- if (servername.text==""){errormessage=qsTr("No server given! ")}
- else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
- else if (password.text=="") {errormessage+=qsTr("No password given! ")}
- else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
- //else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")}
- else {errormessage=""}
- if (errormessage=="") {
- Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){
- accountBusy.running=false;
- var credentials=JSON.parse(obj);
- if (credentials.hasOwnProperty('status')){
- Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root)
- }
- else{
- filesystem.Directory=userconfig.imagestore;
- filesystem.makeDir("contacts");
- filesystem.makeDir("albums");
- Service.storeConfig(db,userconfig);
- Service.readConfig(db,function(userconfig){
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- });
- accountPage.users=storedUsers});
- //reset values
- root.login=userconfig;
- root.news=[];
- },"isActive",0);
-
- //Service.requestProfile(userconfig,db,root,function(nc){root.newContacts=nc});
- Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
- }
- });
-
- }
- else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
- }}
-
-
-
- Button {
- x: parent.width/2+2*mm; y: mm; width: 5*mm; height: 8*mm;
- text: "-"
- font.pixelSize: 3*mm
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
- Service.deleteConfig(db,userconfig,function(){
- filesystem.Directory=imagestore.text+"contacts";
- filesystem.rmDir();
- filesystem.Directory=imagestore.text+"albums";
- filesystem.rmDir();
- servername.text="https://";
- servericon.visible=false;
- servericon.source="";
- username.text="";
- password.text="";
- imagestore.text="";
- //maxNews.value=0;
- newsTypeField.text="Conversations";
- //messageIntervalSlider.value=30;
- userButton.text=qsTr("User");
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- accountPage.users=storedUsers;})
- })
- }}
-
- Button {
- x: parent.width/2+8*mm; y: mm; width: 5*mm; height: 8*mm;
- text: "+"
- font.pixelSize: 3*mm
- onClicked:{
- servername.text="https://"
- servericon.visible=false;
- servericon.source="";
- username.text=""
- password.text=""
- imagestore.text=""
- //maxNews.value=0
- newsTypeField.text="Conversations"
- //messageIntervalSlider.value=30
- userButton.text=qsTr("User")
- }
- }
-
- Button {
- x: parent.width/2+14*mm; y: mm; width: 5*mm; height: 8*mm;
- text: "?"
- font.pixelSize: 3*mm
- onClicked:{
- root.push("qrc:/qml/configqml/InfoBox.qml");
- }
- }
- Button{
- id:closeButton
- height: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
- Menu {
- id:newstypemenu
- MenuItem {
- font.pixelSize: 3*mm
- text: qsTr("Timeline")
- onTriggered: {newsTypeField.text="Timeline"}
- }
- MenuItem {
- font.pixelSize: 3*mm
- text: qsTr("Conversations")
- onTriggered: {newsTypeField.text="Conversations"}
- }
- }
-
- Component.onCompleted: {
- try{Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- accountPage.users=storedUsers;
- Service.readConfig(db,function(obj){
- userButton.text=obj.username;
- servername.text=obj.server;
- accountPage.setServericon(obj.server);
- username.text= obj.username;
- password.text=Qt.atob(obj.password);
- imagestore.text=obj.imagestore;
- //maxNews.value=obj.maxnews;
- newsTypeField.text=obj.newsViewType;
- //messageIntervalSlider.value=obj.timerInterval;
- if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
- },"isActive",0)
- })
-// Service.readGlobaloptions(db,function(go){
-// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-
- }
- catch (e){print(e)
-// Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",accountPage,function(html){
-// print(html);
-// var bpos=html.indexOf("base ");
-// var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
-// servername.text=baseurl
-// })
- }
- }
-}
diff --git a/source-android/qml/configqml/ConfigPage.qml b/source-android/qml/configqml/ConfigPage.qml
deleted file mode 100644
index 7593d81..0000000
--- a/source-android/qml/configqml/ConfigPage.qml
+++ /dev/null
@@ -1,227 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.4
-
-import "qrc:/js/service.js" as Service
-//import "qrc:/js/layout.js" as Layoutjs
-//import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-Page{
- //anchors.fill: parent
- width:root.width
- height:root.height
- //contentHeight: configBackground.height
- //boundsBehavior: Flickable.StopAtBounds
-
-// Rectangle{
-// id:configBackground
-// color: "white"
-// anchors.fill: parent
-// width:parent.width
-// height:Math.max(90*mm,root.height-12*mm)
-// property var users:[]
-// property bool registeredUser: true
-// property var userdata: ({})
-
-// Text {
-// text: qsTr("Image dir.")
-// //text: qsTr("Max. News")
-// font.pixelSize:3*mm
-// x: 4*mm; y: 10*mm
-// }
- Text {
- text: qsTr("Max. News")
- //text: qsTr("News as")
- font.pixelSize:3*mm
- x: 4*mm; y:10*mm
- }
-
-
-// Text {
-// text: qsTr("Show Website")
-// x: 4*mm; y: 40*mm; width: 20*mm
-// }
-
-
-// Rectangle{color: "light grey"; x: 4*mm; y: 13.5*mm; width: root.width-14*mm; height: 5*mm;}
-// Flickable {
-// id: imagestoreFlickable
-// x: 4*mm; y: 13.5*mm; width: root.width-14*mm; height: 5*mm;
-// clip: true
-// TextInput {
-// id: imagestore
-// width: imagestoreFlickable.width
-// height: imagestoreFlickable.height
-// font.pixelSize:3*mm
-// wrapMode: TextEdit.NoWrap
-// onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
-// }
-// }
-
-// FileDialog {
-// id: imagestoreDialog
-// title: "Please choose a directory"
-// folder: shortcuts.pictures
-// selectFolder: true
-// onAccepted: {
-// var imagestoreString=imagestoreDialog.folder.toString();
-// imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
-// imagestore.text=imagestoreString
-// }
-// }
-
-// Button {
-// x: root.width-9*mm; y: 13.5*mm; width: 7*mm; height: 8*mm;
-// text: "..."
-// onClicked:
-// {imagestoreDialog.open()}
-// }
-
-
- Slider{ id: maxNews
- x:19*mm; y: 13.5*mm;width: root.width/2;height:5*mm
- from: 0;to:2000; stepSize: 100
- value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
- }
-
-
- Rectangle{color: "light grey"; x: 4*mm; y: 13.5*mm; width: 9*mm; height: 5*mm;
- radius: 0.5*mm
- TextEdit{id:maxNewsText;
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:maxNews.value
- focus: true
- selectByMouse: true
- onTextChanged: {
- Service.updateglobaloptions(root.db,"max_news",text);
- }
- }
- }
-
- Rectangle{
- x: 4*mm; y:23.5*mm; width: parent.width - 14*mm; height: 5*mm;
- color:"light grey"
- radius: 0.5*mm
- Text{
- anchors.fill: parent
- font.pixelSize:3*mm
- text:qsTr("Sync")
- }
- MouseArea{
- anchors.fill:parent
- onClicked:root.push("qrc:qml/configqml/SyncConfig.qml");
- }
- }
-// Slider{ id: messageIntervalSlider
-// x:22*mm; y: 73.5*mm;width: root.width/2;height:5*mm
-// from: 0;to:120; stepSize: 15
-// }
-// Rectangle{
-// x: 4*mm; y: 73.5*mm; width: 9*mm; height: 5*mm;
-// TextEdit{
-// id: messageIntervalField
-// anchors.fill: parent
-// font.pixelSize:3*mm
-// verticalAlignment:TextEdit.AlignRight
-// text:messageIntervalSlider.value
-// focus: true
-// selectByMouse: true
-// }
-// }
-// Text{x: 14*mm; y: 73.5*mm; width: 5*mm; height: 5*mm;
-// font.pixelSize:3*mm
-// text:qsTr("Min.")
-// }
-
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- MButton {
- anchors.right: closeButton.left; anchors.rightMargin: mm;
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- width: 8*mm; height: 6*mm;
- text: "?"
- font.pixelSize: 3*mm
- onClicked:{
- root.push("qrc:/qml/configqml/InfoBox.qml");
- }
- }
- MButton{
- id:closeButton
- height: 6*mm
- width :8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
-// Menu {
-// id:newstypemenu
-// MenuItem {
-// text: qsTr("Timeline")
-// onTriggered: {newsTypeField.text="Timeline"}
-// }
-// MenuItem {
-// text: qsTr("Conversations")
-// onTriggered: {newsTypeField.text="Conversations"}
-// }
-// }
-
-// Component.onCompleted: {
-// Service.readGlobaloptions(db,function(go){
-// if(go.hasOwnProperty("max_news")){maxNews.value=go.max_news}else{maxNews.value=1000}
-// //if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-// }
-}
diff --git a/source-android/qml/configqml/ConfigTab.qml b/source-android/qml/configqml/ConfigTab.qml
deleted file mode 100644
index e13aefd..0000000
--- a/source-android/qml/configqml/ConfigTab.qml
+++ /dev/null
@@ -1,482 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 1.2
-
-import "qrc:/js/service.js" as Service
-import "qrc:/js/layout.js" as Layoutjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-StackView{
- id: configStack
- anchors.fill:parent
- initialItem: Flickable{
- width:root.width-5*mm
- height:root.height-12*mm
- contentHeight: configBackground.height
- boundsBehavior: Flickable.StopAtBounds
-
- Rectangle{
- id:configBackground
- color: "white"
- width:parent.width
- height:Math.max(90*mm,root.height-12*mm)
- property var users:[]
- property bool registeredUser: true
- property var userdata: ({})
-
- function setServericon(server){
- try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",configBackground, function (obj){
- var serverdata = JSON.parse(obj);
- servericon.visible=true;
- servericon.source=serverdata.site.logo})} catch(e){print(e)}
- }
-
- BlueButton{
- id:userButton
- text:qsTr("User")
- y:mm
- width: root.width/2
- onClicked:{
- var useritems="";
- for (var i=0;i-1){
- Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),configBackground)
- }
- // Helperjs.friendicaWebRequest(servername.text+'/api/users/show?screen_name='+username.text,configBackground,function(obj){
- // var screennametest=JSON.parse(obj);
- // if (screennametest.hasOwnProperty('status')){
- // Helperjs.showMessage(qsTr("Error"),qsTr("Nickname not registered at given server!"),configBackground);
- // configBackground.registeredUser=false;
- // }else{configBackground.registeredUser=true}
- // });
- // }
- }
- }
- }
- BlueButton {
- x: root.width-9*mm; y: 23.5*mm; width:7*mm
- text: "\uf234"
- onClicked: {
- configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}})
- }
- }
-
- Rectangle{
- color: "light grey"
- x: 4*mm; y: 33.5*mm; width: root.width-6*mm; height: 5*mm;
- TextInput {
- id: password
- anchors.fill: parent
- font.pixelSize:3*mm
- selectByMouse: true
- echoMode: TextInput.PasswordEchoOnEdit
- }
- }
-
- Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;}
- Flickable {
- id: imagestoreFlickable
- x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;
- clip: true
- TextInput {
- id: imagestore
- width: imagestoreFlickable.width
- height: imagestoreFlickable.height
- font.pixelSize:3*mm
- wrapMode: TextEdit.NoWrap
- onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
- }
- }
-
- FileDialog {
- id: imagestoreDialog
- title: "Please choose a directory"
- folder: shortcuts.pictures
- selectFolder: true
- onAccepted: {
- var imagestoreString=imagestoreDialog.folder.toString();
- imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
- imagestore.text=imagestoreString
- }
- }
-
- BlueButton {
- x: root.width-9*mm; y: 43.5*mm; width: 7*mm; height: 5*mm;
- text: "..."
- onClicked:
- {imagestoreDialog.open()}
- }
-
-
- Slider{ id: maxNews
- x:19*mm; y: 53.5*mm;width: root.width/2;height:5*mm
- minimumValue: 0;maximumValue:2000; stepSize: 100
- }
-
-
- Rectangle{color: "light grey"; x: 4*mm; y: 53.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{id:maxNewsText;
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:maxNews.value
- focus: true
- selectByMouse: true
- }
- }
-
- Rectangle{
- x: 4*mm; y: 63.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
- color:"light grey"
- Text{
- id: newsTypeField
- anchors.fill: parent
- font.pixelSize:3*mm
- text:"Conversations"
- }
- MouseArea{
- anchors.fill:parent
- onClicked:newstypemenu.popup()
- }
- }
- Slider{ id: messageIntervalSlider
- x:22*mm; y: 73.5*mm;width: root.width/2;height:5*mm
- minimumValue: 0;maximumValue:120; stepSize: 15
- }
- Rectangle{
- x: 4*mm; y: 73.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{
- id: messageIntervalField
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:messageIntervalSlider.value
- focus: true
- selectByMouse: true
- }
- }
- Text{x: 14*mm; y: 73.5*mm; width: 5*mm; height: 5*mm;
- font.pixelSize:3*mm
- text:qsTr("Min.")
- }
-
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- BlueButton {
- x: 4*mm; y: 83.5*mm
- text: qsTr("Confirm")
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestore.text,maxnews:maxNewsText.text,interval: messageIntervalField.text, newsViewType:newsTypeField.text};
- var errormessage="";
- if (servername.text==""){errormessage=qsTr("No server given! ")}
- else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
- else if ((configBackground.registeredUser==false)){errormessage+=qsTr("Nickname not registered at given server! ")}
- else if (password.text=="") {errormessage+=qsTr("No password given! ")}
- else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
- else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")}
- else {errormessage=""}
- if (errormessage=="") {
- Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){
- var credentials=JSON.parse(obj);
- if (credentials.hasOwnProperty('status')){
- Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root)
- }
- else{
- filesystem.Directory=userconfig.imagestore;
- filesystem.makeDir("contacts");
- filesystem.makeDir("albums");
- Service.storeConfig(db,userconfig);
- Service.readConfig(db,function(userconfig){
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- });
- configBackground.users=storedUsers});
- userButton.color="black"
- //reset values
- root.login=userconfig;
- root.news=[];
- },"isActive",0);
- Service.requestProfile(userconfig,db,root,function(nc){root.newContacts=nc});
- if(osSettings.osType=="Android" && userconfig.timerInterval !=0){
- alarm.setAlarm(userconfig.timerInterval);
- }
- Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
- }
- });
-
- }
- else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
- }}
-
-
-
- BlueButton {
- x: root.width/2+2*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "-"
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
- Service.deleteConfig(db,userconfig,function(){
- filesystem.Directory=imagestore.text+"contacts";
- filesystem.rmDir();
- filesystem.Directory=imagestore.text+"albums";
- filesystem.rmDir();
- configBackground.registeredUser=true;
- servername.text="https://...";
- servericon.visible=false;
- servericon.source="";
- username.text="";
- password.text="";
- imagestore.text="";
- maxNews.value=0;
- newsTypeField.text="Conversations";
- messageIntervalSlider.value=30;
- userButton.text=qsTr("User");
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- configBackground.users=storedUsers;})
- })
- }}
-
- BlueButton {
- x: root.width/2+8*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "+"
- onClicked:{
- configBackground.registeredUser=true;
- servername.text="https://..."
- servericon.visible=false;
- servericon.source="";
- username.text=""
- password.text=""
- imagestore.text=""
- maxNews.value=0
- newsTypeField.text="Conversations"
- messageIntervalSlider.value=30
- userButton.text=qsTr("User")
- }
- }
-
- BlueButton {
- x: root.width/2+14*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "?"
- onClicked:{
- configStack.push({item:"qrc:/qml/configqml/InfoBox.qml"});
- }
- }
-
- Menu {
- id:newstypemenu
- MenuItem {
- text: qsTr("Timeline")
- onTriggered: {newsTypeField.text="Timeline"}
- }
- MenuItem {
- text: qsTr("Conversations")
- onTriggered: {newsTypeField.text="Conversations"}
- }
- }
-
- Component.onCompleted: {
- try{Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- configBackground.users=storedUsers;
- Service.readConfig(db,function(obj){
- userButton.text=obj.username;
- servername.text=obj.server;
- configBackground.setServericon(obj.server);
- username.text= obj.username;
- password.text=Qt.atob(obj.password);
- imagestore.text=obj.imagestore;
- maxNews.value=obj.maxnews;
- newsTypeField.text=obj.newsViewType;
- messageIntervalSlider.value=obj.timerInterval;
- if( obj.isActive==0){userButton.fontColor='black'} else {userButton.fontColor='grey'}},"isActive",0
- )
- })
-// Service.readGlobaloptions(db,function(go){
-// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-
- }
- catch (e){print(e)
- Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",configBackground,function(html){
- var bpos=html.indexOf("baseurl");
- var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
- servername.text=baseurl
- })}
- }
-}
-}
-}
diff --git a/source-android/qml/configqml/InfoBox.qml b/source-android/qml/configqml/InfoBox.qml
deleted file mode 100644
index 31a9c57..0000000
--- a/source-android/qml/configqml/InfoBox.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/qml/genericqml"
-
-Rectangle{
- color:"white"
- width:infoBoxText.contentWidth
- height:infoBoxText.contentHeight
- Text{id:infoBoxText
- anchors.top:closeButton.bottom
- anchors.topMargin: mm
- textFormat: Text.RichText
- width: root.width-mm
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- text: "Friendiqa v0.5 Licensed under GPL 3 with the exception of OpenSSL "+
- "Profile https://freunde.ma-nic.de/profile/friendiqa "+
- "Sourcecode: https://git.friendi.ca/LubuWest/Friendiqa "+
- "Privacy Policy: http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md "+
- "Most of C++ code by Fabio "+
- "QML and Javascript code by Marco "+
- "Qt Framework www.qt.io "+
- "Icons by FontAwesome "+
- "Folder Icon by KDE Breeze Icons "+
- "AndroidNative by Ben Lau "+
- "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- onLinkActivated:{
- Qt.openUrlExternally(link)}
- }
- Button{
- id:closeButton
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
-}
diff --git a/source-android/qml/configqml/SyncConfig.qml b/source-android/qml/configqml/SyncConfig.qml
deleted file mode 100644
index 9f42fe8..0000000
--- a/source-android/qml/configqml/SyncConfig.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import "qrc:/qml/configqml"
-import "qrc:/js/service.js" as Service
-
-Rectangle{
- color:"white"
- width:root.width
- height:root.height
- Text {
- text: qsTr("Sync Interval (0=None)")
- font.pixelSize:3*mm
- //visible: false
- x: 4*mm; y: 10*mm; //width:35*mm;wrapMode: Text.Wrap
- }
-
- Slider{ id: messageIntervalSlider
- x:22*mm; y: 13.5*mm;width: root.width/2;height:5*mm
- value: globaloptions.syncinterval
- from: 0;to:120; stepSize: 15
- }
- Rectangle{
- x: 4*mm; y: 13.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{
- id: messageIntervalField
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:messageIntervalSlider.value
- focus: true
- selectByMouse: true
- onTextChanged: {
- Service.updateglobaloptions(root.db,"syncinterval",text);
- if(osSettings.osType=="Android" && text !=0){
- alarm.setAlarm(text);
- } else if(osSettings.osType=="Linux" && text !=0){
-
- }
- }
- }
- }
- Text{x: 14*mm; y: 13.5*mm; width: 5*mm; height: 5*mm;
- font.pixelSize:3*mm
- text:qsTr("Min.")
- }
-
- Column{
- y:22*mm
- width: parent.width
- spacing:mm
- //anchors.fill: parent
- SyncComponent{adapter:"Timeline"}
- SyncComponent{adapter:"Replies"}
- SyncComponent{ adapter:"DirectMessages"}
- SyncComponent{ adapter:"Notifications"}
- }
-
- Button{
- id:closeButton
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- height: 6*mm
- width: 8*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
-}
diff --git a/source-android/qml/contactqml/ContactDetailsComponent.qml b/source-android/qml/contactqml/ContactDetailsComponent.qml
deleted file mode 100644
index cd5112c..0000000
--- a/source-android/qml/contactqml/ContactDetailsComponent.qml
+++ /dev/null
@@ -1,176 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/qml/genericqml"
-
-Item {
-id: contactLargeComponent
-x:mm
-y:mm
-property var contact:({})
-property var createdAtDate: new Date(contact.created_at)
-property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+" ")
-
-Rectangle {
- id: wrapper
-
- width:root.width-2*mm //friendsTabView.width;
- height:root.height-20*mm// friendsTabView.height-15*mm
- border.color: "grey"
- color:"white"
- Image {
- id: photoImage
- x:mm
- y:mm
- width: 15*mm
- height:15*mm
- source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
-
- Label {
- id: namelabel
- x: mm
- width: root.width-6*mm //friendsTabView.width-4*mm
- height: 3*mm
- text:contact.name+" (@"+contact.screen_name+")"
- elide:Text.ElideRight
- anchors.topMargin: 0
- anchors.left: photoImage.left
- color: "#303030"
- font.pixelSize: 4*mm
- anchors.top: photoImage.bottom
- }
-Rectangle{
- id: detailsrectangle
- anchors.top: namelabel.bottom
- anchors.topMargin: 2*mm
-
- ScrollView{
- horizontalScrollBarPolicy:Qt.ScrollBarAlwaysOff
- //frameVisible: true
- id:namelabelflickable
- width: root.width-10*mm
- height:root.height-50*mm
- x: mm
- clip:true
- Text{
- id:namelabeltext
- width: namelabelflickable.width
- height: implicitHeight
- font.pixelSize: 3*mm
- textFormat:Text.RichText
- wrapMode: Text.Wrap
- text:""+qsTr("Description")+": "+contact.description+" "+qsTr("Location")+": "+contact.location+" "+qsTr("Posts")+": "+contact.statuses_count+
- " "+qsTr("URL")+":"+contact.url+" "+
- connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale())
- onLinkActivated: {
- Qt.openUrlExternally(link)}
- }
- }
-
- Row{
- anchors.top: namelabelflickable.bottom
- anchors.topMargin: 2*mm
- x: mm
- spacing:4
-
- MButton{
- id:photobutton
- height: 6*mm
- width: 8*mm
- text: "\uf03e" // "Photos"
- visible:(contact.network=="dfrn")
- onClicked:{
- fotostab.phototabstatus="Contact";
- root.currentIndex=2;
- fotostab.active=true;
- root.fotoSignal(contact) ;
- contactLargeComponent.destroy();
- }
- }
-
- MButton{
- id:messagebutton
- height: 6*mm
- width: 8*mm
- text: "\uf0e6" //"Messages"
- onClicked:{
- root.currentIndex=0;
- //newstab.active=true;
- root.messageSignal(contact) ;
- contactLargeComponent.destroy();
- }
- }
-
- MButton{
- id:dmbutton
- visible: (contact.following=="true")
- height: 6*mm
- width: 8*mm
- text: "\uf040" //"DM"
- onClicked:{
- root.currentIndex=0;
- root.directmessageSignal(contact.screen_name);
- contactLargeComponent.destroy();
- }
- }
-
-
- Button{
- id:eventbutton
- visible:(contact.network=="dfrn")
- height: 6*mm
- width: 8*mm
- text:"\uf073" //Events
- onClicked:{
- root.currentIndex=3;
- calendartab.active=true;
- calendartab.calendartabstatus="Friend"
- root.eventSignal(contact);
- contactLargeComponent.destroy();
- }
- }
-
- Button{
- id: closeButton
- height: 6*mm
- width: 8*mm
- text: "\uf057" //"close"
- onClicked:{contactLargeComponent.destroy();
- }
- }
- }
- }
-}
-}
diff --git a/source-android/qml/contactqml/Contactlist.qml b/source-android/qml/contactqml/Contactlist.qml
deleted file mode 100644
index 67564ca..0000000
--- a/source-android/qml/contactqml/Contactlist.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// List of people
-import QtQuick 2.0
-import QtQuick.Controls 2.5
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle {
- id:contactlistRectangle
- property var contacts:[]
- property var possibleUsers: []
- //y:8*mm
- color: "white"
- border.color: "light grey"
- radius:0.5*mm
- width:groupListView.width
- height:groupListView.height
-
- ListView {
- id: contactView
- x:mm
- y:6*mm
- width: contactlistRectangle.width-2*mm
- height: contactlistRectangle.height-10*mm
- clip: true
- spacing: 0
- model: contactModel
- delegate: listContact
- }
-
- ListModel{id: contactModel}
-
- Component { id:listContact
- Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- radius:0.5*mm
- width:contactView.width
- height:6*mm
- Image {
- id: contactImage
- x:1
- y:1
- width: 5*mm
- height:5*mm
- source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
- Text{
- font.pixelSize: 3*mm
- anchors.left: contactImage.right
- anchors.margins: 1*mm
- text:Qt.atob(contact.name)
- }
- Text {
- id:selected
- anchors.right:parent.right
- visible: contactlist.indexOf(contact)>-1
- z:4
- text: "\u2713"
- width: 5*mm
- anchors.top: parent.top
- color: "green"
- font.pixelSize: 3*mm
- }
-
- MouseArea{
- anchors.fill: parent
- onClicked:{
- if(selected.visible==true){
- contacts.splice(Helperjs.inArray(contacts,"id",contact.id),1);
- selected.visible=false
- }
- else{
- contacts.push(contact);
- selected.visible=true;
- }
- }
- }
- }
- }
-
- MButton {
- id: closeButton
- height:6* mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- //color:"white"
- text: "\uf057"
- onClicked: {
- groupModelAppend(contacts,function(){
- contactlistRectangle.destroy()
- });
- }
- }
-
- Component.onCompleted: {
- for (var user in possibleUsers){
- contactModel.append({"contact":possibleUsers[user]})
- }
- }
-}
diff --git a/source-android/qml/contactqml/FriendsTab.qml b/source-android/qml/contactqml/FriendsTab.qml
deleted file mode 100644
index 41741e7..0000000
--- a/source-android/qml/contactqml/FriendsTab.qml
+++ /dev/null
@@ -1,392 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-//import QtQuick.Controls.Styles 1.4
-import QtQuick.Layouts 1.11
-import QtQuick.LocalStorage 2.0
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/service.js" as Service
-import "qrc:/qml/contactqml"
-import "qrc:/qml/genericqml"
-
-Rectangle {
- y:1
- color: "white"
-
- function showContactdetails(contact){
- var component = Qt.createComponent("qrc:/qml/contactqml/ContactDetailsComponent.qml");
- if(contact.isFriend){
- friendsTabView.currentIndex=1;
- var contactDetails = component.createObject(friendstab,{"contact": contact})
- }
- else{friendsTabView.currentIndex=2;
- var contactDetails = component.createObject(friendstab,{"contact": contact})
- }
- }
-
- function showProfile(callback){
- var profile=({});
- Helperjs.readData(db,"profiles",login.username,function(profileobject){
- var profilearray=[];
- for (var i in profileobject){
- profilearray.push(JSON.parse(Qt.atob(profileobject[i].profiledata)));
- }
- profile.profiles=profilearray;
- });
- Helperjs.readData(db,"contacts",login.username,function(owner){
- profile.friendica_owner=owner[0];
- },"isFriend",2);
- callback(profile)
- }
-
- TabBar {
- id: friendsbar
- width: parent.width
- height: 9*mm
- position:TabBar.Header
- currentIndex: 1
- TabButton {
- text: qsTr("Me")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Friends")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Contacts")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Groups")
- font.pixelSize: 2*mm
- }
- }
- StackLayout{
- id:friendsTabView
- //anchors.fill: parent
- x:mm
- y:10*mm
- width: parent.width-2*mm
- height: parent.height-10*mm
- currentIndex: friendsbar.currentIndex
- signal contactsSignal(var contact)
- signal groupsSignal(var username)
- onCurrentIndexChanged:{
- if (currentIndex==1){
- contactsSignal("")
- }
- else if (currentIndex==2){
- contactsSignal("")
- }
- else if (currentIndex==3){groupsSignal(root.login.username)}
- }
-// style: TabViewStyle {
-// frameOverlap: 1
-// tab: Rectangle {
-// color: "white"
-// implicitWidth: root.width/4-2*mm
-// implicitHeight: 4*mm
-// Text { id: text
-// anchors.centerIn: parent
-// text: styleData.title
-// color: "dark grey"
-// font.pixelSize:2.5*mm
-// font.bold: styleData.selected
-// }
-// }
-// frame: Rectangle { color: "light grey" }
-// tabsAlignment:Qt.AlignHCenter
-// }
-
- Item{
- id:profileGridTab
- Layout.fillWidth:true
- Layout.fillHeight: true
- Component.onCompleted:{
- showProfile(function(profile){
- var component = Qt.createComponent("qrc:/qml/contactqml/ProfileComponent.qml");
- var profilecomp = component.createObject(profileGridTab,{"profile": profile});
- });
- }
- }
-
- Item{
- id: friendsGridTab
- Layout.fillWidth:true
- Layout.fillHeight: true
- property int currentContact: 0
- function showFriends(contact){
- try {friendsModel.clear()} catch(e){print(e)};
- Helperjs.readData(root.db,"contacts",login.username,function(friendsobject){
- for (var i=0;i1){
- friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid
- }
- friendsModel.append({"contact":friendsobject[i]});
- }
- },"isFriend",1,"screen_name ASC");
- }
- Connections{
- target:xhr
- onDownloaded:{
- if(type=="contactlist"){
- //print(url+" "+filename+" "+i)
- friendsGridTab.currentContact=i+1;
- if(friendsGridTab.currentContact==root.newContacts.length){
- friendsGridTab.showFriends(root.login.username)
- }
- }
- }
- }
- MButton {
- id: updateFriendsButton
- text: "\uf021"
- anchors.top: parent.top
- anchors.topMargin: mm
- anchors.right: parent.right
- height: 6*mm
- width: 8*mm
- onClicked: {
- try {friendsModel.clear()} catch(e){print(e)};
- //root.contactLoadType="friends";
- Newsjs.requestFriends(root.login,db,root,function(nc){
- root.newContacts=nc
- })
- }
- }
-
- ProgressBar{
- id: newContactsProgress
- width: 15*mm
- height: updateFriendsButton.height
- anchors.top: parent.top
- anchors.right:updateFriendsButton.left
- anchors.rightMargin:mm
- visible: (friendsGridTab.currentContact!=(root.newContacts.length))?true:false
- value: friendsGridTab.currentContact/root.newContacts.length
- }
-
- //GridView {
- ListView{
- id: friendsView
- x:mm
- y:updateFriendsButton.height+2*mm
- width:friendsGridTab.width-2*mm
- height:friendsGridTab.height-updateFriendsButton.height-2*mm
- clip: true
- spacing: 2
- //add: Transition {
- // NumberAnimation { properties: "x,y"; from: 300; duration: 1000 }
- // }
- model: friendsModel
- delegate: ContactComponent { }
- }
-
- ListModel{id:friendsModel}
-
- Component.onCompleted: {
- root.friendsSignal.connect(showFriends);
- friendsTabView.contactsSignal.connect(showFriends);
- showFriends(root.login.username);
- root.newContacts=[]
- }
- }
-
- Item{
- id: contactsGridTab
- Layout.fillWidth:true
- Layout.fillHeight: true
- function showContacts(contact){
- try {contactsModel.clear()} catch(e){print(e)};
- Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){
- for (var j=0;j
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/qml/genericqml"
-
-Item {
- id: groupComponent
- property var groupmembers:[]
- //property bool newGroup: false
- function groupModelAppend(groupcontacts,callback){
- for (var n in groupcontacts){
- groupModel.append({"groupmember":groupcontacts[n]});}
- callback()
- }
-
- Rectangle {
- id: wrapper
- width: 16*mm
- height: 15*mm
- border.color: "grey"
- color:"white"
-
- Image {
- id: photoImage
- x:1
- y:1
- width: 10*mm
- height:10*mm
- source:"qrc:/images/defaultcontact.jpg"
- }
- Rectangle{
- id:namelabelRect
- x: 1
- width: wrapper.width-2
- height: 3.5*mm
- anchors.top: photoImage.bottom
- border.color: "light grey"
- TextInput {
- id: namelabel
- anchors.fill: parent
- readOnly: true
- text: group.new?"":group.groupname
- color: "#303030"
- font.pixelSize: 3*mm
-
- }
- }
-
- MButton{
- id: closeButton
- visible: false
- width: 8*mm
- height: 6*mm
- anchors.left: infobutton.right
- anchors.margins: mm
- anchors.top: parent.top
-
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{groupComponent.state="";
- if (group.new){groupsModel.remove(index)}
- }
- }
-
- MButton{
- id:infobutton
- width: 4*mm
- height: 6*mm
-
- //color:"transparent"
- text:"?"
- font.pixelSize: 3*mm
- anchors.left: photoImage.right
- anchors.leftMargin: mm
- anchors.topMargin: mm
- anchors.top: parent.top
- onClicked:{
- //if(group.new){
- Helperjs.readField("members",root.db,"groups",root.login.username,function(groups){
- try {groupModel.clear()}catch (e){print(e)}
- groupmembers=JSON.parse(groups);
- for (var user in groupmembers){
- Helperjs.readData(root.db,"contacts",root.login.username,function(userdata){
- if (userdata[0]){
- userdata[0].name=Qt.atob(userdata[0].name);
- userdata[0].description=Qt.atob(userdata[0].description)
- groupModel.append({"groupmember":userdata[0]
- })}
- },"id",groupmembers[user])
- } //catch(e){}
- },"groupname",group.groupname);
- //}
- groupComponent.state="large"
- }
- }
-
- Rectangle{
- id: detailsrectangle
- anchors.top: namelabelRect.bottom
- anchors.topMargin: mm
- opacity: 0
-
- Component {
- id:groupMember
- Rectangle{
- width:parent.width
- height:6*mm
- Rectangle{id:memberrectangle
- border.color: "#EEEEEE"
- border.width: 1
- width:parent.width-12*mm
- height:6*mm
- Image {
- id: memberImage
- x:1
- y:1
- width: 5*mm
- height:5*mm
- source:(groupmember.isFriend==1)? "file://"+groupmember.profile_image :groupmember.profile_image_url
- onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
- Text{
- font.pixelSize: 3*mm
- anchors.left: memberImage.right
- anchors.margins: 1*mm
- width:parent.width-1
- text:groupmember.name
- }
- MouseArea{
- anchors.fill: parent
- onClicked:{
-// root.currentIndex=1;
-// friendstab.active=true;
-// root.contactdetailsSignal(groupmember)
- root.currentIndex=0;
- root.contactdetailsSignal(groupmember)
- }
- }
- // BlueButton{
- // anchors.left: memberrectangle.right
- // anchors.margins: 1*mm
- // text: "\uf056"
- // onClicked:{
- // groupModel.remove(index)
- // }
- // }
- }
- }
- }
-
- ListView{
- id: groupListView
- x:1
- //anchors.top: parent.top
- width: root.width-10*mm
- height:groupsView.height - 24*mm
- clip: true
- spacing: 2
- model: groupModel
- delegate: groupMember
- }
-
- ListModel{id: groupModel}
-
- Row{
- anchors.top: groupListView.bottom
- anchors.topMargin: mm
- spacing: mm
-
- }
-
-// BlueButton{
-// id: addMembers
-// text:"\uf234"
-// onClicked: {
-// Newsjs.listFriends(root.login,root.db,function(userdata){
-// var newlistcontacts=[];
-// for (var n in userdata){
-// if (groupmembers.indexOf(userdata[n].id)==-1){
-// newlistcontacts.push(userdata[n])
-// }
-// }
-// var component = Qt.createComponent("qrc:/qml/contactqml/Contactlist.qml");
-// var contactlistobject = component.createObject(groupListView,{"possibleUsers":newlistcontacts});
-
-// })
-// }
-// }
-
-// BlueButton{
-// id: updateButton
-// text: "\uf0ee"
-// onClicked:{
-// var groupobject={};
-// var groupmembers=[];
-// for (var i=0;i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/qml/genericqml"
-import "qrc:/js/service.js" as Service
-
-Rectangle {
-// width:parent.width-2*mm
-// height:parent.height-14*mm
- anchors.fill:parent
- color:"white"
- property var profile:({})
- property var attachImageURLs:[]
- property var createdAtDate: new Date(profile.friendica_owner.created_at)
-
- function updateProfileImage(){
- xhr.url= login.server + "/api/account/update_profile_image.json";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.clearParams();
- xhr.setImageFileParam("image", photoImage.source );
- xhr.post();
- }
-
- function buildProfiletext(pobject,callback){
- var profileobject={};
- var profiletext="";
- for (var key in pobject){//print(key+obj[key])
- if(pobject[key]!=""&&key!="users"&&key!="profile_id"){
- var keytext="";
- switch(key){
- case "profile_name":keytext=qsTr("profile name");break;
- case "is_default":keytext=qsTr("is default");break;
- case "hide_friends":keytext=qsTr("hide friends");break;
- case "profile_photo":keytext=qsTr("profile photo");break;
- case "profile_thumb":keytext=qsTr("profile thumb");break;
- case "publish":keytext=qsTr("publish");break;
- case "net_publish":keytext=qsTr("publish in network");break;
- case "description":keytext=qsTr("description");break;
- case "date_of_birth":keytext=qsTr("date of birth");break;
- case "address":keytext=qsTr("address");break;
- case "city":keytext=qsTr("city");break;
- case "region":keytext=qsTr("region");break;
- case "postal_code":keytext=qsTr("postal code");break;
- case "country":keytext=qsTr("country");break;
- case "hometown":keytext=qsTr("hometown");break;
- case "gender":keytext=qsTr("gender");break;
- case "marital":keytext=qsTr("marital status");break;
- case "marital_with":keytext=qsTr("married with");break;
- case "marital_since":keytext=qsTr("married since");break;
- case "sexual":keytext=qsTr("sexual");break;
- case "politic":keytext=qsTr("politics");break;
- case "religion":keytext=qsTr("religion");break;
- case "public_keywords":keytext=qsTr("public keywords");break;
- case "private_keywords":keytext=qsTr("private keywords");break;
- case "likes":keytext=qsTr("likes");break;
- case "dislikes":keytext=qsTr("dislikes");break;
- case "about":keytext=qsTr("about");break;
- case "music":keytext=qsTr("music");break;
- case "book":keytext=qsTr("book");break;
- case "tv":keytext=qsTr("tv");break;
- case "film":keytext=qsTr("film");break;
- case "interest":keytext=qsTr("interest");break;
- case "romance":keytext=qsTr("romance");break;
- case "work":keytext=qsTr("work");break;
- case "education":keytext=qsTr("education");break;
- case "social_networks":keytext=qsTr("social networks");break;
- case "homepage":keytext=qsTr("homepage");break;
- default:keytext=key;
- }
- profiletext=profiletext+(""+keytext+": "+(pobject[key])+" ");
- }
- }
- callback(profiletext)
- }
-
- MButton {
- id: update
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: mm
- anchors.right: parent.right
- text: "\uf021"
- font.pixelSize: 3*mm
- onClicked: {
- Service.requestProfile(root.login,root.db,root,function(nc){
- root.newContacts=nc;
- photoImage.source="";
- showProfile(function(newprofile){
- profile=newprofile;
- try {profileModel.clear()} catch(e){print(e)};
- newprofile.profiles.sort(function(obj1, obj2) {
- return obj1.profile_id - obj2.profile_id;
- })
- for(var i in newprofile.profiles){var obj=newprofile.profiles[i];
- buildProfiletext(obj,function(profiletext){
- profileModel.append({"profileid":obj.profile_id,"profiletext":profiletext})
- })
- }
- photoImage.source="file://"+newprofile.friendica_owner.profile_image;
- });
- });
- }
- }
-
-
- Image {
- id: photoImage
- anchors.top: parent.top
- anchors.topMargin: mm
- anchors.left: parent.left
- width: 15*mm
- height:15*mm
- source: "file://"+profile.friendica_owner.profile_image
- onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- MouseArea{
- anchors.fill: parent
- onClicked:{
- imagePicking=true;
- var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
- osSettings.imagePickQml+'{multiple: false;onReady: {photoImage.source=imageUrl;'+
- '}}',profileGridTab,"imagePicker");
- imagePicker.pickImage()
- }
- }
- }
- Rectangle{
- id:phototextRectangle
- color:"black"
- z:3
- opacity: 0.5
- width:6*mm
- height: phototext.contentHeight
- anchors.top: photoImage.top
- anchors.right: photoImage.right
- }
- Text {
- id:phototext
- z:4
- text: "\uf040"
- width:5*mm
- anchors.top: photoImage.top
- anchors.right:photoImage.right
- color: "white"
- font.pixelSize: 4*mm
- }
-
- MButton{
- id:updatebutton
- height: 6*mm
- width:8*mm
- visible: "file://"+profile.friendica_owner.profile_image!= photoImage.source
- text:qsTr("Update")
- font.pixelSize: 3*mm
- anchors.left: photoImage.right
- anchors.leftMargin: 0.5*mm
- anchors.topMargin: mm
- anchors.top: parent.top
- onClicked:{updateProfileImage()}
- }
- Label {
- id: namelabel
- x: mm
- width: parent.width-6*mm
- height: 3*mm
- text:(Qt.atob(profile.friendica_owner.name))+" (@"+profile.friendica_owner.screen_name+")"
- elide:Text.ElideRight
- anchors.topMargin: 0
- anchors.left: photoImage.left
- wrapMode: Text.Wrap
- color: "#303030"
- font.pixelSize: 4*mm
- anchors.top: photoImage.bottom
- }
-
- ListModel{id:profileModel}
- Component{
- id:profileItem
- Rectangle{
- id:profileRect
- width:profileView.width
- height: 5*mm+profiletextfield.height
- Text{
- y:mm
- font.pixelSize: 3*mm
- text:""+qsTr("profile id")+": "+profileid+" "
- color:"black"
- }
- Text{
- id:profiletextfield
- x:2*mm
- y:4.5*mm
- width:parent.width-2.5*mm
- wrapMode: Text.Wrap
- font.pixelSize: 3*mm
- text:profiletext
- color:"black"
- }
- }
- }
- Component{
- id:textcomponent
- Text{
- id:namelabeltext
- width: namelabelflickable.width
- height: implicitHeight
- font.pixelSize: 3*mm
- textFormat:Text.RichText
- wrapMode: Text.Wrap
- text:""+qsTr("Description")+": "+(Qt.atob(profile.friendica_owner.description))+" "+qsTr("Location")+": "+profile.friendica_owner.location+" "+qsTr("Posts")+": "+profile.friendica_owner.statuses_count+
- " "+qsTr("URL")+":"+profile.friendica_owner.url+" "+
- ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale())
- onLinkActivated: {
- Qt.openUrlExternally(link)}
- }
- }
-
-// Rectangle{
-// id: detailsrectangle
-
-
- ScrollView{
- ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
- id:namelabelflickable
- anchors.top: namelabel.bottom
- anchors.topMargin: 2*mm
- width: parent.width-mm
- height:parent.height-22*mm//friendsTabView.height-45*mm
- x: mm
- clip:true
-
- ListView {
- id: profileView
- header:textcomponent
-// width:parent.width
-// height: root.height
-// clip: true
- spacing: 0
- model: profileModel
- delegate: profileItem
- }
- }
-// }
-
- Component.onCompleted: {
- profile.profiles.sort(function(obj1, obj2) {
- return obj1.profile_id - obj2.profile_id;
- })
- for(var i in profile.profiles){var obj=profile.profiles[i];
- buildProfiletext(obj,function(profiletext){
- profileModel.append({"profileid":obj.profile_id,"profiletext":profiletext})
- })
- }
- }
-}
diff --git a/source-android/qml/friendiqa.qml b/source-android/qml/friendiqa.qml
index c061520..e9c5227 100644
--- a/source-android/qml/friendiqa.qml
+++ b/source-android/qml/friendiqa.qml
@@ -33,45 +33,55 @@ import QtQuick 2.5
import QtQuick.LocalStorage 2.0
import QtQuick.Window 2.0
import QtQuick.Controls 2.4
+import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/service.js" as Service
+import "qrc:/qml/genericqml"
-StackView{
+ApplicationWindow{
id:root
+ title: "Friendiqa"
property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsAndroid.qml");return tmp.createObject(root)}
- width: osSettings.appWidth
- height:osSettings.appHeight
+ visible: true
property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
property var login: Service.readActiveConfig(db)
- property var globaloptions: ({}) //Service.readGlobaloptions(db)
+ property var globaloptions: Service.readGO(db)
+ property real fontFactor: root.font.pixelSize/root.font.pointSize
property var contactlist: []
property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5
- signal messageSignal(var friend)
+ property bool wideScreen : width>height
signal fotoSignal(var username, var friend)
signal directmessageSignal(var friend)
signal newsSignal(var news)
signal newstypeSignal(var type)
signal friendsSignal(var username)
signal contactdetailsSignal(var contact)
+ signal contactRefreshSignal()
+ signal searchSignal (var searchterm)
signal eventSignal(var contact)
+ signal eventcreateSignal(var event)
signal uploadSignal(var urls)
signal sendtextSignal(var intenttext)
signal changeimage(var method, var type, var id)
+ signal updateSyncinterval(int interval)
+ signal replySignal(var newsobject)
property var news:[]
property var newContacts:[]
+ property var contactposts:[]
//property string contactLoadType: ""
property bool imagePicking: false
- onLoginChanged:{
- if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")}
- else{root.push(rootStackItem)
- newstab.newstabstatus=login.newsViewType;
+ Material.theme: Material.System
+
+ function onLoginChanged(login){
+ if(login=="" || login==null){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
+ else{
Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts})}
}
- onNewContactsChanged:{
+ function onNewContactsChanged(newContacts){
if(newContacts.length>0){// download contact images and update db
var contacturls=[];
var contactnames=[];
@@ -90,9 +100,32 @@ StackView{
}
+ Connections {
+ target: root
+ function onWidthChanged(appWidth) {
+ if(osSettings.osType=="Linux" && Math.abs(appWidth-(globaloptions.appWidth||0))>50){
+ Service.updateglobaloptions(db,"appWidth",appWidth)
+ }
+ }
+ }
+ Connections {
+ target: root
+ function onHeightChanged(appHeight) {
+ if(osSettings.osType=="Linux" && Math.abs(appHeight-(globaloptions.appHeight||0))>50){
+ Service.updateglobaloptions(db,"appHeight",appHeight)
+ }
+ }
+ }
+
+
+ function showContact(contact){
+ rootstackView.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact})
+ }
+
+
Connections{
target:xhr
- onDownloaded:{
+ function onDownloaded(type,url,filename,i){
if(type=="contactlist"){
var database=LocalStorage.openDatabaseSync(root.db[0],root.db[1],root.db[2],root.db[3]);
var result;
@@ -103,300 +136,142 @@ StackView{
}
}
+
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
- Keys.onReleased: {
- if (event.key === osSettings.backKey) {
- if (currentIndex==0){
+ onClosing: {
+ if (rootstack.currentIndex==0){
newstab.active=true;
- if (newstab.newstabstatus!=login.newsViewType){
- newstab.newstabstatus=login.newsViewType;
- if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
+ if ((newstab.newstabstatus!="") && (newstab.newstabstatus!=globaloptions.newsViewType)&&(globaloptions.newsViewType!=null)){
+ newstab.newstabstatus=globaloptions.newsViewType;
+ if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
else{
- Newsjs.chatsfromdb(db,login.username,function(dbnews){
+ Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
+ close.accepted=false;
+ }
+
+ else if (newstab.conversation.length>0){
+ newstab.conversation=[];
+ close.accepted=false
+ }
+ else if (rootstackView.depth>1){
+ rootstackView.pop();
+ roottoolbar.visible=true;
+ close.accepted=false
+ }
+ else{
+ Service.cleanNews(root.db,function(){
+ Service.cleanHashtags(root.db,function(){
+ Service.cleanContacts(root.login,root.db,function(){
+ Qt.quit()
+ })
+ })})
+ close.accepted=true
}
- else if (newstab.conversation.length>0){newstab.conversation=[]}
- else{Service.cleanNews(root.db,function(){
- Service.cleanContacts(root.login,root.db,function(){
- Qt.quit()})
- })}
}
- else if (currentIndex==2){fotoSignal("backButton")}
- else {currentIndex=0}
- event.accepted = true
- }}
-
- Drawer{
- id: leftDrawer
- width: 0.66* root.width
- height: root.height
- edge: Qt.LeftEdge
- position: 1.0
- Column{
- x:mm
- width:parent.width-mm
- Label{
- text: login.hasOwnProperty("username")?login.username:""
- font.pixelSize: 4*mm
- width: parent.width
- height: 6*mm
- }
-// Label{
-// text:login.hasOwnProperty("server")?"@"+login.server:""
-// font.pixelSize: 5*mm
-// width: parent.width
-// }
-
- Label{
- text: "\uf021 " + qsTr("Refresh")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("refresh")
-// updatenews.setDatabase();
-// updatenews.login();
-// updatenews.startsync();
- }
- }
- }
-
-
- Label{
- text: "\uf1da " + qsTr("Timeline")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("timeline")
- }
- }
- }
-
- Label{
- text: "\uf086 " + qsTr("Conversations")
- width: parent.width
- font.pixelSize: 4*mm
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("conversation")
- }
- }
- }
-
- Label{
- text: "\uf005 " + qsTr("Favorites")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("favorites")
- }
- }
- }
- Label{
- text: "\uf0ec " + qsTr("Replies")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("replies")
- }
- }
- }
-
-
- Label{
- text: "\uf0ac " + qsTr("Public Timeline")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("publictimeline")
- }
- }
- }
-
- Label{
- text: "\uf0c0 " + qsTr("Group news")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("groupnews")
- }
- }
- }
-
- Label{
- text: "\uf002 " + qsTr("Search")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("search")
- }
- }
- }
-
- Label{
- text: "\uf085 "+ qsTr("Settings")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked: {root.push("qrc:qml/configqml/ConfigPage.qml");
- leftDrawer.close()
- }
- }
- }
- Label{
- text: "\uf2bb " + qsTr("Accounts")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked: {root.push("qrc:qml/configqml/AccountPage.qml");
- leftDrawer.close()
- }
- }
- }
-
- Label{
-
- text: "\uf08b " +qsTr("Quit")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- Service.cleanNews(root.db,function(){
- Service.cleanContacts(root.login,root.db,function(){
- Qt.quit()})
- })
- }
- }
- }
-
- }
+ else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");bar.currentIndex=0;close.accepted=false}
+ else {rootstack.currentIndex=0;bar.currentIndex=0;close.accepted=false}
}
- Item{
- id:rootStackItem
- //anchors.fill:parent
- states: State {
- name: "fullscreen";
- PropertyChanges { target: bar; height:0 }
- PropertyChanges { target: rootstack; height:parent.height }
+ footer:ToolBar{id:roottoolbar
+ background: Rectangle{
+ anchors.fill: parent
+ color: Material.backgroundDimColor
}
- transitions: Transition {
- PropertyAnimation { properties: "height";
- easing.type: Easing.InOutQuad
- duration: 1000
+ TabBar {
+ id: bar
+ width:parent.width
+ onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex
+ TabButton {
+ text: "\uf03a"
+ font.pointSize: osSettings.bigFontSize
+ background:Rectangle{
+ anchors.fill: parent
+ color: Material.backgroundDimColor
+ }
+ }
+ TabButton {
+ text: "\uf0c0"
+ font.pointSize: osSettings.bigFontSize
+ background:Rectangle{
+ anchors.fill: parent
+ color: Material.backgroundDimColor
+ }
+ }
+ TabButton {
+ text: "\uf03e"
+ font.pointSize: osSettings.bigFontSize
+ background:Rectangle{
+ anchors.fill: parent
+ color: Material.backgroundDimColor
+ }
+ }
+ TabButton {
+ text: "\uf073"
+ font.pointSize: osSettings.bigFontSize
+ background:Rectangle{
+ anchors.fill: parent
+ color: Material.backgroundDimColor
+ }
}
}
- TabBar {
- id: bar
- width: parent.width
- height: 7*mm
- position:TabBar.Footer
- anchors.top: rootstack.bottom
- onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex
- TabButton {
- text: "\uf03a"
- font.pixelSize: 3*mm
- height: 6*mm
- }
- TabButton {
- text: "\uf0c0"
- font.pixelSize: 3*mm
- height: 6*mm
- }
- TabButton {
- text: "\uf03e"
- font.pixelSize: 3*mm
- height: 6*mm
- }
+ }
- TabButton {
- text: "\uf073"
- font.pixelSize: 3*mm
- height: 6*mm
- }
- }
-
- StackLayout{
+ StackView{id:rootstackView
+ width:root.width
+ height: root.height
+ initialItem: StackLayout{
id:rootstack
- width:parent.width
- height: parent.height-7*mm
+ width:rootstackView.width
+ height: rootstackView.height
currentIndex:bar.currentIndex
-
Loader{
id: newstab
- Layout.fillWidth:true
- Layout.fillHeight: true
property string newstabstatus
property var conversation:[]
- property var contactposts:[]
source:(rootstack.currentIndex==0)? "qrc:/qml/newsqml/NewsTab.qml":""
+ //onDoubleClicked:{newstypeSignal("refresh")}
}
Loader{
id: friendstab
- Layout.fillWidth:true
- Layout.fillHeight: true
source: (rootstack.currentIndex==1)?"qrc:/qml/contactqml/FriendsTab.qml":""
}
Loader{
id: fotostab
property string phototabstatus:"Images"
- Layout.fillWidth:true
- Layout.fillHeight: true
source: (rootstack.currentIndex==2)?"qrc:/qml/photoqml/PhotoTab.qml":""
}
Loader{
id: calendartab
property string calendartabstatus:"Events"
- Layout.fillWidth:true
- Layout.fillHeight: true
source: (rootstack.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":""
}
-
}
+ }
+
Component.onCompleted: {
- Service.readGlobaloptions(db,function(go){globaloptions=go})
- //print(xhr.networktype());
+ onLoginChanged(login);
+ globaloptions=Service.readGO(db);
+ if(globaloptions.view_darkmode==1){Material.theme=Material.Dark}
+ else if (globaloptions.view_darkmode==2){Material.theme=Material.Light}
+ else {Material.theme=Material.System}
+ //forceActiveFocus();
if(osSettings.osType=="Android"){
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root);
- } else if (osSettings.osType=="Linux"){
+ }
+ else if (osSettings.osType=="Linux"){
var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
var LinuxSyncQml = component.createObject(root);
}
}
}
-}
diff --git a/source-android/qml/genericqml/BlueButton.qml b/source-android/qml/genericqml/BlueButton.qml
deleted file mode 100644
index 997db9b..0000000
--- a/source-android/qml/genericqml/BlueButton.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-Rectangle{
- id: blueButton
- width: Math.max(mainText.width+2*mm,8*mm)
- height: 5*mm
- color:"light blue"//"#EFEAEA" "sky blue"
- property alias fontColor: mainText.color
-// border.color:"grey"
-// border.width:1
- radius: mm
- property alias text: mainText.text
- property alias font: mainText.font
- signal clicked
- state:""
-
- Text{
- id:mainText
- color: "black"
- anchors.centerIn: parent
- width: contentWidth
- height: contentHeight
- font.family:fontAwesome.name
- font.pixelSize: 3*mm
- text: ""
- }
- MouseArea{
- id:buttonArea
- anchors.fill:parent
- onPressed: blueButton.state="Pressed"
- onReleased: blueButton.state=""
- onClicked: {parent.clicked()}
- }
-
-states: [
- State { name: "Pressed"
- PropertyChanges { target: blueButton; color: "white"} }
- ]
-transitions: [
- Transition { to:"*"
- ColorAnimation { target: blueButton; duration: 100} }
- ]
-}
diff --git a/source-android/qml/genericqml/ImagePickerLinux.qml b/source-android/qml/genericqml/ImagePickerLinux.qml
deleted file mode 100644
index cd3b182..0000000
--- a/source-android/qml/genericqml/ImagePickerLinux.qml
+++ /dev/null
@@ -1,187 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import Qt.labs.folderlistmodel 2.1
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:imageDialog
- z:2
- border.color: "grey"
- width: parent.width-4*mm
- height:parent.height-12*mm
- x:2*mm
- y:10*mm
- property string directory: ""
- property bool multiple: false
- property string imageUrl: ""
- property var imageUrls: []
- signal ready();
- function pickImage() {}
-
- Text{
- id:directoryText
- x:0.5*mm
- y:0.5*mm
- width: imageDialog.width-15*mm
- height:contentHeight
- wrapMode: Text.Wrap
- text: directory
- }
- Button{
- id:closeButton
- height: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- onClicked:{ready();imageDialog.destroy()}
- }
-
- ListView {
- id: imageView
- x:0.5*mm
- y: Math.max(directoryText.height, closeButton.height)+mm
- width: imageDialog.width-2*mm
- height: imageDialog.height-imageView.y-4*mm
- clip: true
- model: imageModel
- delegate: imageItem
- }
-
- FolderListModel{
- id: imageModel
- nameFilters: ["*.png", "*.jpg",".jpeg","*.JPG","*.gif"]
- sortField: FolderListModel.Time
- sortReversed:false
- showDotAndDotDot: true
- showDirs: true
- showDirsFirst: true
- folder:directory
- }
-
- BusyIndicator{
- id: imageBusy
- anchors.horizontalCenter: imageView.horizontalCenter
- anchors.top:imageView.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- running:false
- }
-
- Component{
- id:imageItem
- Item{
- width:imageView.width
- height:folderImage.height+2*mm
- Rectangle{
- id:imagetextRectangle
- color:"black"
- x:mm
- z:3
- opacity: fileIsDir?0:0.5
- width:imagetext.contentWidth
- height: imagetext.contentHeight
- anchors.bottom: folderImage.bottom
- }
- Text {
- id:imagetext
- x:fileIsDir?11*mm:mm
- z:4
- text: fileName
- width: fileIsDir?parent.width - 12*mm :imageView.width-mm
- anchors.bottom: folderImage.bottom
- color: fileIsDir?"black":"white"
- font.pixelSize: 3*mm
- wrapMode:Text.Wrap
- }
- Text {
- id:selected
- anchors.right:parent.right
- visible: attachImageURLs.indexOf(fileURL)>-1
- z:4
- text: "\u2713"
- width: 10*mm
- anchors.top: folderImage.top
- color: "green"
- font.pixelSize: 10*mm
- }
-
- Image{id:folderImage
- width: fileIsDir?10*mm: imageView.width-mm
- fillMode:Image.PreserveAspectFit
- source:fileIsDir?"qrc:/images/folder-blue.png":fileURL
- }
-
- MouseArea{
- anchors.fill: parent
- onClicked:{
- if (fileName==".."){
- imageModel.folder=imageModel.parentFolder;
- directory=imageModel.parentFolder
- }
- else if (fileIsDir){
- imageModel.folder=fileURL;
- directory=fileURL
- }
- else{
- if (multiple!=true){
- //attachImageURLs.push(fileURL);
- //attachImage(fileURL);
- imageUrls.push(fileURL);
- imageUrl=fileURL;
- ready();
- imageDialog.destroy()
- }
- else {
- if(selected.visible==true){
- imageUrls.splice(imageUrls.indexOf(fileURL,1))
- selected.visible=false
- }
- else{
- imageUrls.push(fileURL);
- selected.visible=true;
-
- }
- imageUrl=fileURL
- }
- }
- }
- }
- }
- }
-}
diff --git a/source-android/qml/genericqml/IntentReceiver.qml b/source-android/qml/genericqml/IntentReceiver.qml
deleted file mode 100644
index 1ceaacf..0000000
--- a/source-android/qml/genericqml/IntentReceiver.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-import QtQuick 2.0
-import AndroidNative 1.0
-
-Item {
- id:intent
- /// The URL of the image chosen. If multiple images are picked, it will be equal to the first image.
- property string imageUrl: ""
-
- /// A list of images chosen
- property var imageUrls: []
-
- property string m_TEXT_MESSAGE: "androidnative.TextIntent.chosen";
- property string m_IMAGE_MESSAGE: "androidnative.ImagePicker.chosen";
-
-
- Connections {
- target: SystemDispatcher
- onDispatched: {
- if ((type === m_IMAGE_MESSAGE)&& (root.imagePicking==false)) {
- var h=[];
- for (var n in message.imageUrls){
- h.push("file://"+ decodeURIComponent(message.imageUrls[n]).substring(5))
- }
- imageUrls=h;
- if(imageUrls.length==1){
- rootstack.currentIndex=0;newstab.active=true;
- root.uploadSignal(imageUrls)
- } else{
- rootstack.currentIndex=2;fotostab.active=true;
- root.uploadSignal(imageUrls)
- }
- } else if (type==m_TEXT_MESSAGE){
- rootstack.currentIndex=0;newstab.active=true;
- root.sendtextSignal(message)
- }
- }
- }
-
- Component.onCompleted: {
- SystemDispatcher.setInitialized();
- if (root.globaloptions.hasOwnProperty("syncinterval") && root.globaloptions.syncinterval !=null && root.globaloptions.syncinterval !=0){
- alarm.setAlarm(root.globaloptions.syncinterval);
- }
- }
-}
-
diff --git a/source-android/qml/genericqml/PermissionDialog.qml b/source-android/qml/genericqml/PermissionDialog.qml
deleted file mode 100644
index 8faaad8..0000000
--- a/source-android/qml/genericqml/PermissionDialog.qml
+++ /dev/null
@@ -1,220 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:permissionDialog
-// x: mm
- width: parent.width-5*mm
- height:root.height/3
- function updatePerms(){
- for (var i=0;i-1){contactstatus="positive"}
- else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"}
- contactModel.append({"contact":contacts[name],"contactstatus":contactstatus})
- }},"isFriend",1);
-
- Helperjs.readData(db,"groups",login.username,function(owngroups){
- for (var number in owngroups){
- var groupstatus= "neutral";
- if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"}
- else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"}
- groupModel.append({"group":owngroups[number],"groupstatus":groupstatus})
- }});
- }
-}
diff --git a/source-android/qml/genericqml/Search.qml b/source-android/qml/genericqml/Search.qml
deleted file mode 100644
index 835e7be..0000000
--- a/source-android/qml/genericqml/Search.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Controls 1.2
-import "qrc:/qml/genericqml"
-//import "qrc:/js/news.js" as Newsjs
-//import "qrc:/js/helper.js" as Helperjs
-//import "qrc:/js/service.js" as Service
-
-
-Rectangle {
- id:searchComponent
- //onActiveFocusChanged: searchText.forceActiveFocus()
- //onVisibleChanged: if (visible) searchText.forceActiveFocus()
-// border.color: "#EEEEEE"
-// border.width: 1
- color:"lightgrey"
-// width:conversationView.width
-// height:Math.max(replyText.contentHeight+2*mm,6*mm)
- Rectangle{
- color: "white"
- radius:0.5*mm
- anchors.left: parent.left
- anchors.leftMargin:mm
- anchors.top:parent.top
- anchors.topMargin: 0.5*mm
- width:parent.width-2*mm
- height: 4*mm //Math.max( searchText.contentHeight,5*mm)
-
- TextInput {
- id: searchText
- focus: true
- font.pixelSize: 3*mm
- wrapMode: Text.Wrap
- anchors.fill: parent
- selectByMouse: true
- cursorVisible: false
- onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()}
- //onHeightChanged: newsView.contentY+=4.5*mm
-
- }
- Component.onCompleted: searchText.forceActiveFocus()
-// BlueButton {
-// id: sendButton
-// text: "\uf002"
-// anchors.left: parent.right
-// anchors.leftMargin:mm
-// anchors.top:parent.top
-// //anchors.topMargin: 0.5*mm
-// color:"white"
-// onClicked: {
-// var body=searchText.getText(0,searchText.length);
-// search(body)
-// }
-// }
- }
-
-}
diff --git a/source-android/qml/newsqml/ContactPage.qml b/source-android/qml/newsqml/ContactPage.qml
deleted file mode 100644
index e3c7ead..0000000
--- a/source-android/qml/newsqml/ContactPage.qml
+++ /dev/null
@@ -1,217 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle {
- id:contactList
- color: "white"
- property var contact:({})
- property string profileimagesource:contact.profile_image
- ListView {
- id: contactView
- x:mm
- y:9*mm
- width: contactList.width-4*mm
- height:contactList.height-10*mm
- clip: true
- spacing: 0
- header: contactHeader
- model: contactModel
- delegate: Newsitem{}
- }
- BusyIndicator{
- id: contactBusy
- anchors.centerIn:parent
- width:10*mm
- height: 10*mm
- running: true
- }
-
- Component { id: contactHeader
- Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- color:"white"
- width:contactView.width
- height: profileImage.height+namelabel.height+detailtext.height+7*mm
- //height: wrapper.height
- property var createdAtDate: new Date(contact.created_at)
- property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+" ")
-
- Image {
- id: profileImage
- x:mm
- y:mm
- width: contactView.width/2
- height:width
- source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- Connections{
- target:contactList
- onProfileimagesourceChanged:profileImage.source=profileimagesource
- }
- }
- Column{id:buttoncolumn
- anchors.right: parent.right
- anchors.rightMargin: mm
- y: mm
- spacing:4
-
- MButton{
- id:photobutton
- height: 6*mm
- width: 8*mm
- text: "\uf03e" // "Photos"
- //font.pixelSize: 3*mm
- visible:(contact.network=="dfrn")
- onClicked:{
- rootstack.currentIndex=2;
- bar.currentIndex=2;
- fotostab.phototabstatus="Contact";
-
- //fotostab.active=true;
- fotoSignal(root.login,contact) ;
- newsStack.pop();
- }
- }
-
- MButton{
- id:dmbutton
- height: 6*mm
- width: 8*mm
- visible: (contact.following=="true")
- text: "\uf040" //"DM"
- //font.pixelSize: 3*mm
- onClicked:{
- rootstack.currentIndex=0;
- newsSwipeview.currentIndex=2;
- directmessageSignal(contact)
- }
- }
-
- MButton{
- id:eventbutton
- visible:(contact.network=="dfrn")
- height: 6*mm
- width: 8*mm
- text:"\uf073"
- //font.pixelSize: 3*mm
- onClicked:{
- rootstack.currentIndex=3;
- bar.currentIndex=3;
- calendartab.calendartabstatus="Friend"
- eventSignal(contact);
- newsStack.pop()
- }
- }
-
- }//Column end
- Label {
- id: namelabel
- x:mm
- width: contactView.width-2*mm
- height: implicitHeight
- text:contact.name+" (@"+contact.screen_name+")"
- wrapMode: Text.Wrap//elide:Text.ElideRight
- color: "#303030"
- font.pixelSize: 4*mm
- anchors.top: profileImage.bottom
- anchors.topMargin: mm
- }
- Text{
- id:detailtext
- anchors.top: namelabel.bottom
- anchors.topMargin: 2*mm
- x:mm
- width: contactView.width-2*mm
- height: implicitHeight
- font.pixelSize: 2.5*mm
- textFormat:Text.RichText
- wrapMode: Text.Wrap
- text:""+qsTr("Description")+": "+contact.description+" "+qsTr("Location")+": "+contact.location+" "+qsTr("Posts")+": "+contact.statuses_count+
- " "+qsTr("URL")+":"+contact.url+" "+
- connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale())
- onLinkActivated: {
- Qt.openUrlExternally(link)}
- }
-
-
- //}
- }
-
- }//Component end
- Connections{
- target:newstab
- onContactpostsChanged:{
- if (newstab.contactposts.length>0){profileimagesource=newstab.contactposts[0].user.profile_image_url_large}
- contactBusy.running=false;
- contactModel.clear();
- var currentTime= new Date();
- var msg = {'currentTime': currentTime, 'model': contactModel,'news':newstab.contactposts, 'options':globaloptions};
- contactWorker.sendMessage(msg)
- }
- }
-
- ListModel{id: contactModel}
-
- WorkerScript {
- id: contactWorker
- source: "qrc:/js/newsworker.js"
- }
-
- MButton {
- id: closeButton
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- //font.pixelSize: 3*mm
- onClicked: {
- newsStack.pop()
- }
- }
- Component.onCompleted: {
- xhr.clearParams();
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/user_timeline");
- xhr.setParam("user_id",contact.id)
- xhr.get();
- }
-}
diff --git a/source-android/qml/newsqml/Conversation.qml b/source-android/qml/newsqml/Conversation.qml
deleted file mode 100644
index c3fc24a..0000000
--- a/source-android/qml/newsqml/Conversation.qml
+++ /dev/null
@@ -1,189 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// ConversationView with button
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-import "qrc:/qml/newsqml"
-
-Rectangle {
- id:conversationList
-// width:root.width-5*mm
-// height:root.height-12*mm
- //property var news
-// y:1
-// z:2
- color: "white"
-// border.color: "grey"
-// width:root.width-5*mm
-// height: conversationView.height+10*mm
-
- ListView {
- id: conversationView
- x:3*mm
- y:8*mm
- width: conversationList.width-4*mm
- //height: contentHeight
- height:conversationList.height-10*mm
- clip: true
- spacing: 0
- footer: MessageSend{conversation:true}//footerReply
- model: conversationModel
- delegate: Newsitem{}
- }
- BusyIndicator{
- id: conversationBusy
- anchors.horizontalCenter: conversationView.horizontalCenter
- anchors.top:conversationList.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- running: true
- }
-
- Connections{
- target:newstab
- onConversationChanged:{
- //if(newsitem.itemindex==newsStack.conversationIndex){
- if(newstab.conversation.length==0){
- newsStack.pop()
- //newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning);
- //conversationList.destroy(); conversationsymbol.color="grey"
- } else { conversationBusy.running=false;
- conversationModel.clear();
- var currentTime= new Date();
- var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'options':globaloptions};
- conversationWorker.sendMessage(msg)
- //conversationsymbol.color="grey"
- }
- //}
- }
- }
-
-// Component { id:footerReply
-// Rectangle{
-// border.color: "#EEEEEE"
-// border.width: 1
-// color:"lightgrey"
-// width:conversationView.width
-// height:Math.max(replyText.contentHeight+2*mm,6*mm)
-// Rectangle{
-// color: "white"
-// radius:0.5*mm
-// anchors.left: parent.left
-// anchors.leftMargin:mm
-// anchors.top:parent.top
-// anchors.topMargin: 0.5*mm
-// width:parent.width-12*mm
-// height:Math.max( replyText.contentHeight,5*mm)
-
-// TextInput {
-// id: replyText
-// font.pixelSize: 3*mm
-// wrapMode: Text.Wrap
-// anchors.fill: parent
-// selectByMouse: true
-// onHeightChanged: conversationView.contentY+=4.5*mm
-// }
-// }
-
-// Button {
-// id: sendButton
-// height: 8*mm
-// width:8*mm
-// text: "\uf1d9"
-// anchors.right: parent.right
-// anchors.rightMargin:mm
-// anchors.top:parent.top
-// anchors.topMargin: 0.5*mm
-// //color:"white"
-// onClicked: { try{
-// var body=replyText.getText(0,replyText.length);
-// newsBusy.running=true;
-// replyText.text=""
-// xhr.clearParams();
-// xhr.setLogin(login.username+":"+Qt.atob(login.password));
-// if (conversationModel.get(0).newsitemobject.messagetype==0){
-
-// //xhr.url= login.server + "/api/statuses/update.json";
-// xhr.setUrl(login.server);
-// xhr.setApi("/api/statuses/update");
-// xhr.setParam("source", "Friendiqa");
-// xhr.setParam("status", body);
-// xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.id)}
-// else {//xhr.url= login.server + "/api/direct_messages/new.json";
-// xhr.setUrl(login.server);
-// xhr.setApi("/api/direct_messages/new");
-// xhr.setParam("text", body);
-// xhr.setParam("screen_name",conversationModel.get(conversationModel.count-1).newsitemobject.screen_name);
-// xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.id)
-// }
-// xhr.post();
-// } catch(e){Helperjs.showMessage("Error",e.toString(),root)}
-// }
-// }
-// }
-// }
-
-
-
- ListModel{id: conversationModel}
-
- WorkerScript {
- id: conversationWorker
- source: "qrc:/js/newsworker.js"
- }
-
- MButton {
- id: closeButton
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- onClicked: {
- //newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning);
- newsStack.pop()
- //conversationList.destroy();
- //conversationsymbol.color="grey"
- }
- }
-
-// Component.onCompleted: {
-// if (news){var currentTime= new Date();
-// var msg = {'currentTime': currentTime, 'model': conversationModel,'news':news};
-// conversationWorker.sendMessage(msg)}
-// }
-}
diff --git a/source-android/qml/newsqml/MessageSend.qml b/source-android/qml/newsqml/MessageSend.qml
deleted file mode 100644
index 37b46a9..0000000
--- a/source-android/qml/newsqml/MessageSend.qml
+++ /dev/null
@@ -1,427 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// message.qml
-// message with buttons
-import QtQuick 2.4
-import QtQuick.Controls 2.4
-//import QtQuick.Dialogs 1.2
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/smiley.js" as Smileyjs
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/qml/genericqml"
-
-
-Rectangle{
- color:"#EEEEEE"
- width:parent.width
- height: (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0
- id:messageSend
- visible:(newsSwipeview.stacktype!="Notifications")?true:false
- property string parentId: ""
- //property var parentObject:({})
- property bool conversation: false
- property string reply_to_user:""
- property alias bodyMessage: bodyField.text
- property var attachImageURLs: [];
- //property int directmessage: 0;
- property var contacts: []
- property var groups: []
- property var contact_allow:login.permissions[0]
- property var contact_deny:login.permissions[1]
- property var group_allow:login.permissions[2]
- property var group_deny:login.permissions[3]
-
- onReply_to_userChanged: {
- if (reply_to_user!=""){
- receiverLabel.visible=true
- }
- }
-
- function directmessagePrepare(friend){
- messageSend.state="active";
- reply_to_user=friend.screen_name;
- receiverLabel.text=qsTr("to:")+ " "+ friend.screen_name;
- }
-
-
- function sendUrls(urls){
- if((urls.length==1 && attachImageURLs.length==0)){
- attachImage(urls);
- attachImageURLs.push(urls);
- messageSend.state="active";
- }
- }
-
- function sendtext(text){
- if(text){
- if (text.subject=="undefined"){text.subject=""}
- if(text.plaintext.lastIndexOf(".jpg")>-1 || text.plaintext.lastIndexOf(".jpeg")>-1 || text.plaintext.lastIndexOf(".png")>-1 || text.plaintext.lastIndexOf(".gif")>-1){
- text.plaintext=""}
- bodyField.text=text.subject+"\n"+text.plaintext;
- messageSend.state="active";
- }
- }
-
-
-
- function attachImage(url){
- var imageAttachmentObject=Qt.createQmlObject('import QtQuick 2.0; Image {id:imageAttachment'+attachImageURLs.length+'; source:"'+
- url.toString()+'"; x:2*mm; width: 45*mm; height: 45*mm;fillMode: Image.PreserveAspectFit;MouseArea{anchors.fill:parent;onClicked:{attachImageURLs.splice(attachImageURLs.indexOf("'+
- url+'"),1); imageAttachment'+attachImageURLs.length+'.destroy()}}}',messageColumn,"attachedImage");
- }
-
- function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) {
- //xhr.url= login.server + "/api/statuses/update.json";
- newsBusy.running=true;
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/update");
- xhr.clearParams();
- xhr.setParam("source", "Friendiqa");
- xhr.setParam("htmlstatus", status);
- if (parentId!="") {xhr.setParam("in_reply_to_status_id", parentId)};
- if (title!=="") {xhr.setParam("title", title)};
- if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
- if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
- if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
- if (contact_deny.length>0) {xhr.setParam("contact_deny", Helperjs.cleanArray(contact_deny))};
- if (attachImageURL.length>0) {for (var image in attachImageURL){xhr.setImageFileParam("media", attachImageURL[image] )}};
- xhr.post();
- }
-
- function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
- newsBusy.running=true;
- //xhr.url= login.server + "/api/direct_messages/new.json";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/direct_messages/new");
- xhr.clearParams();
- xhr.setParam("text", text);
- xhr.setParam("screen_name", screen_name);
- if (parentId!="") {xhr.setParam("replyto", replyto)};
- //if (title!=="") {xhr.setParam("title", title)};
- xhr.post();
- }
-
- function setParent(newsitemobject){
- //print("Newsobject "+newsitemobject.id+ " "+JSON.stringify(newsitemobject.user));
- if (newsitemobject!=""){
- messageSend.state="conversation"
- reply_to_user=newsitemobject.user.screen_name;
- receiverLabel.text=qsTr("to:")+ " "+ newsitemobject.user.screen_name;
- parentId=newsitemobject.id
- } else {
- messageSend.state=""
- reply_to_user="";
- receiverLabel.text=qsTr("to:");
- parentId="";
- bodyField.text="";
- attachImageURLs.pop();
- try{imageAttachment.destroy()}catch(e){}
- }
- }
-
- function contactmenu(letter){
- Newsjs.listFriends(login,db,function(contacts){
- var contactitems="";
- for (var i=0;i1){
- contacts[i].screen_name=contacts[i].screen_name+"+"+contacts[i].cid
- }
- contactitems=contactitems+"MenuItem{text:'"+contacts[i].screen_name+
- "'; onTriggered:{if (newsSwipeview.stacktype=='DirectMessages'){reply_to_user='"+
- contacts[i].screen_name+"'} else {bodyField.insert("+
- bodyField.cursorPosition+",' "+contacts[i].screen_name.substring(1)+" ');bodyField.cursorPosition=bodyField.cursorPosition+"+contacts[i].screen_name.length+"}}}"
- //}
- }
- var menuString="import QtQuick.Controls 2.4; Menu {width:40*mm; font.pixelSize: 3*mm; "+contactitems+"}";
- var contactlistObject=Qt.createQmlObject(menuString,messageColumn,"contactmenuOutput");
- if (contacts.length>0){contactlistObject.popup()}
- },letter);
- }
-// Flickable{
-// anchors.fill: parent
-// contentHeight: messageColumn.height
-// boundsBehavior: Flickable.StopAtBounds
-
- Column {
- y:0.5*mm
- id:messageColumn
- spacing: 0.5*mm
- width: parent.width
- height: 10*mm//implicitHeight
- Label{
- id:receiverLabel
- x: 0.5*mm
- width: parent.width-mm
- font.pixelSize: 3*mm
- text: newsSwipeview.stacktype=="DirectMessages"?qsTr("to:")+ " "+ reply_to_user:""
- visible:false// ((parentId !== "") || (newsStack.parent.stacktype=="DirectMessages"))
- MouseArea{
- anchors.fill: parent
- onClicked:{}
- }
- }
- TextField {
- id: titleField
- x: 0.5*mm
- width: parent.width-mm
- font.pixelSize: 3*mm
- placeholderText: qsTr("Title (optional)")
- visible: false//(parentId === "") && (bodyField.length>1)
- onVisibleChanged: if ((visible==true)&&(conversation==true)){
- conversationView.contentY=conversationView.contentY+titleField.height
- }
- }
-
-
-
- Rectangle{
- color: "white"
- radius: 0.5*mm
- x:mm
- width: parent.width-2*mm
- height:Math.max(bodyField.contentHeight+4*mm,10*mm)
- TextArea {
- id: bodyField
- anchors.fill: parent
- font.pixelSize: 3*mm
- font.family: "Noto Sans"
- wrapMode: Text.Wrap
- selectByMouse: true
- placeholderText: conversation?"": qsTr("What's on your mind?")
- textFormat: TextEdit.RichText //TextEdit.PlainText
- onLineCountChanged: (conversation==true)?conversationView.contentY=conversationView.contentY+3*mm:newsView.contentY=newsView.contentY+3*mm
- onLinkActivated:{Qt.openUrlExternally(link)}
- onActiveFocusChanged:{
- if (activeFocus==true){
- if (conversation==true){
- setParent(conversationModel.get(0).newsitemobject);
- messageSend.state="conversation"
- } else{
- messageSend.state="active"
- }
- }
- }
- onTextChanged:{
- if (text!=""){
- //print(getText(bodyField.cursorPosition-2,bodyField.cursorPosition) +" preedit: "+ preeditText+cursorPosition);
- var regex1 = /@[a-z]/;var regex2 = /![a-z]/;
- //print(text.substring(cursorPosition-2,cursorPosition));
- //if (regex.test(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)) || regex.test(preeditText) || regex.test(text)){
- if (regex1.test(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)+preeditText) || regex2.test(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)+preeditText)){
- var letter=(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)).match(/[a-z]/);
- contactmenu(letter)
- }
- }}
- }
- }
-
-
-// Row{
-// spacing: 2
-// width: parent.width
-// CheckBox{
-// id:dmCheckbox
-// text:"DM"
-// enabled: false
-// checked: (directmessage==1)?true:false
-// onClicked:{
-// if(dmCheckbox.checkedState==Qt.Checked){directmessage=1}
-// else if(dmCheckbox.checkedState==Qt.Unchecked){directmessage=0}
-// }
-// }
-
-// Button{
-// text:"\uf0c1"
-// height:8*mm
-// onClicked: {
-// if(bodyField.selectedText==""){Helperjs.showMessage("Error","No text selected",messageSend)}
-// else{urlTextEdit.text="";
-// urlRectangle.visible=true}}
-// }
-// }
-// Rectangle{
-// id:urlRectangle
-// height: 7*mm //parent.height
-// width:parent.width-2*mm
-// visible:false
-// TextField{
-// id:urlTextEdit
-// width:parent.width-7*mm
-// height:parent.height
-// }
-// Button{
-// anchors.left:urlTextEdit.right
-// anchors.leftMargin:mm
-// height:8*mm
-// text:"\u2713"
-// onClicked: {if(urlTextEdit.text!=""){
-// var start = bodyField.selectionStart;
-// var text=bodyField.selectedText
-// if(text.lastIndexOf(".jpg")>-1 || text.lastIndexOf(".jpeg")>-1 || text.lastIndexOf(".png")>-1){text=""}
-// text = "[url="+urlTextEdit.text+"]" + text + "[/url]";
-// bodyField.remove(start,bodyField.selectionEnd);
-// bodyField.insert(start,text);}
-// urlRectangle.visible=false}
-// }
-// }
- Row{
- id:buttonRow
- visible:false //(bodyField.length>1)||(attachImageURLs.length>0)
- spacing: mm
- height: 12*mm
- MButton{id:permButton
- visible: (newsSwipeview.stacktype!=="DirectMessages")
- height: 6*mm
- width: 7*mm
- text: ((contact_allow.length==0)&&(contact_deny.length==0)&&(group_allow.length==0)&&(group_deny.length==0))?"\uf09c":"\uf023"
- onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}}
- }
- MButton {
- id: attachButton
- height: 6*mm
- width: 7*mm
- text: "\uf03e"
- visible:(newsSwipeview.stacktype!="DirectMessages")
- onClicked: {
- if (attachImageURLs.length>0){//Server currently accepts only one attachment
- Helperjs.showMessage( qsTr("Error"),qsTr("Only one attachment supported at the moment.\n Remove other attachment first!"), messageColumn)
- }
- else{
- root.imagePicking=false;
- var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
- osSettings.imagePickQml+'{multiple : false;onReady: {attachImageURLs.push(imageUrl);'+
- 'attachImage(imageUrl)}}',root,"imagePicker");
- imagePicker.pickImage()
- }
- }
- }
-
- MButton{
- id:smileyButton
- text: "\uf118"
- height: 6*mm
- width: 7*mm
- onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}}
- }
-
- MButton {
- id: cancelButton
- height: 6*mm
- width: 7*mm
- text: "\uf057"
- onClicked: {
- bodyField.text="";
- messageSend.state="";
- permissionDialog.visible=false;
- receiverLabel.visible=false;
- reply_to_user="";
- attachImage("");
- attachImageURLs.pop();
- }
- }
- MButton {
- id: sendButton
- height: 6*mm
- width: 7*mm
- text: "\uf1d9"
- onClicked: {
- var title=titleField.text.replace("\"","\'");
- var body=bodyField.getFormattedText(0,bodyField.length);
- var dmbody=bodyField.getText(0,bodyField.length);
- if (newsSwipeview.stacktype!=="DirectMessages"){
- statusUpdate(title,body,parentId,attachImageURLs)}
- else {
- if (reply_to_user!=""){dmUpdate(title,dmbody,parentId,reply_to_user)}
- else{Helperjs.showMessage(qsTr("Error"),qsTr("No receiver supplied!"),root)}
- }
- if (conversation==true){
- newstab.newstabstatus=login.newsViewType; newsStack.pop(null)
- }
- }
- }
- }
- PermissionDialog{id:permissionDialog;x:mm;visible: false}
- SmileyDialog{id:smileyDialog;x:mm;visible: false}
- }
- Component.onCompleted:{
- //
- //parentId=conversationModel.get(conversationModel.count-1).newsitemobject.id
- //if(attachImageURLs.length>0){attachImage(attachImageURLs[0])}
- newsStack.replySignal.connect(setParent);
- root.directmessageSignal.connect(directmessagePrepare);
- root.uploadSignal.connect(sendUrls);
- root.sendtextSignal.connect(sendtext);
- }
-
- states: [ State {
- name: "active"
- PropertyChanges {
- target: messageColumn; height: implicitHeight
- }
- PropertyChanges {
- target: buttonRow; visible:true
- }
- PropertyChanges {
- target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")//true
- }
- PropertyChanges {
- target: receiverLabel; visible:(newsSwipeview.stacktype=="DirectMessages");
- }
- },
- State {
- name: "conversation"
- PropertyChanges {
- target: messageColumn; height: implicitHeight
- }
- PropertyChanges {
- target: buttonRow; visible:true
- }
- PropertyChanges {
- target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")
- }
-
-// PropertyChanges {
-// target: receiverLabel; visible:true; text:qsTr("to")+": "+ conversationModel.get(0).newsitemobject.user.name
-// }
-
-// PropertyChanges {
-// target: messageSend; reply_to_user: conversationModel.get(0).newsitemobject.user.screen_name
-// }
-
-// PropertyChanges {
-// target: messageSend; parentId: conversationModel.get(0).newsitemobject.status_id
-// }
- } ]
-}
-//}
diff --git a/source-android/qml/newsqml/NewsStack.qml b/source-android/qml/newsqml/NewsStack.qml
deleted file mode 100644
index 5cf9d95..0000000
--- a/source-android/qml/newsqml/NewsStack.qml
+++ /dev/null
@@ -1,579 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/service.js" as Service
-
-StackView{
- id: newsStack
- anchors.fill: parent
- property string updateMethodNews: "refresh"
- property var allchats: ({})
- signal replySignal(var newsobject)
- property int lastnewsid:0
-
- function newstypeHandling(newstype){
- newsBusy.running=true;
- replySignal("");
- //messagesend.state="";
- newsModel.clear();
- switch(newstype){
- case "timeline":
- newstab.newstabstatus="Timeline";
- try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews)
- })}catch(e){Helperjs.showMessage("Error",e,root)};
- break;
- case "conversation":
- newstab.newstabstatus="Conversations";
- Newsjs.chatsfromdb(root.db,root.login,0,function(news,lastid){
- lastnewsid=lastid;
- showNews(news)});
- break;
- case "favorites":
- newsStack.updateMethodNews="refresh";
- newstab.newstabstatus="Favorites";
- Service.updateView("Favorites");
- break;
- case "replies":
- newsStack.updateMethodNews="refresh";
- newstab.newstabstatus="Replies";
- Service.updateView("Replies");
- break;
- case "publictimeline":
- newsStack.updateMethodNews="refresh";
- newstab.newstabstatus="Public Timeline";
- Service.updateView("Public Timeline");
- break;
- case "groupnews":
- newsStack.updateMethodNews="refresh";
- Service.showGroups();
- break;
- case "search":
- newsView.anchors.topMargin=7*mm;
- newsBusy.running=false;
- var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml");
- var searchItem = component.createObject(newsStack,{y:mm,width:root.width,height: 5*mm});
- break;
- case "refresh":
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- //root.contactLoadType="news";
- if (newsSwipeview.stacktype=="Home"){
- Service.updateView(newstab.newstabstatus)
- }
- else if (newsSwipeview.stacktype=="DirectMessage"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Notifications"){
- Service.updateView("Notifications")
- }
- break;
- default:
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- //root.contactLoadType="news";
- if (newsSwipeview.stacktype=="Home"){
- Service.updateView(newstab.newstabstatus)
- }
- else if (newsSwipeview.stacktype=="Directmessage"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Notifications"){
- Service.updateView("Notifications")
- }
- }
- }
-
-
- function showNews(newsToShow){
- try{
- if (newsStack.depth>1){newsStack.pop()}
- }catch(e){}
- newsBusy.running=false;
- var currentTime= new Date();
- // downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
- //print("appendnews "+JSON.stringify(newsToShow))
- var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':newsStack.updateMethodNews, 'options':globaloptions};
- newsWorker.sendMessage(msg);
- //newsStack.appendNews=false
- }
-
- function showContact(contact){ //print(JSON.stringify(contact));
- //newstab.newstabstatus="Contact";
- newsStack.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact});
- }
-
- function search(term){//print("Search "+term)
- if (term!=""){
- newstab.newstabstatus="Search";
- newsBusy.running=true;
- newsStack.updateMethodNews="refresh";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/search");
- xhr.clearParams();
- xhr.setParam("q",term)
- xhr.get();}
- newsView.anchors.topMargin=mm
- }
-
- Connections{
- target:xhr
- onError:{
- Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
- }
- onSuccess:{
- // downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
- Service.processNews(api,data);
- }
- }
-
- Timer {id:replytimer; interval: 1000; running: false; repeat: false
- onTriggered: {
- newsBusy.running=true;
- if(newstab.newstabstatus=="Conversation"){
- showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)}
- else{
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- if (newsSwipeview.stacktype=="Home"){
- Service.updateView(newstab.newstabstatus)
- }
- else if (newsSwipeview.stacktype=="DirectMessages"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Replies"){
- Service.updateView("Replies")
- }
- replySignal("")
- //Service.updateView(newstab.newstabstatus)
- }
- }
- }
-
- initialItem: Rectangle {
- id:newslistRectangle
- y:1
- color: "white"
-
-// Button{
-// id:newstabstatusButton
-// anchors.top: parent.top
-// anchors.topMargin: 0.5*mm
-// height: 8*mm
-// text: qsTr(newstab.newstabstatus)
-// visible: newsStack.parent.stacktype=="standard"
-// onClicked: {print(newsStack.parent.stacktype);
-// newstabmenu.popup(2*mm,6*mm)
-// }
-
-// Menu{id:newstabmenu
-// width: 40*mm
-
-// delegate:MenuItem{
-// contentItem: Text{
-// font.pixelSize: 3.5*mm
-// text:parent.text
-// }
-// background: Rectangle {
-// implicitWidth: 40*mm; implicitHeight: 5*mm
-// color: "#ffffff"
-// border.color: "grey"
-// }
-// }
-// Action {
-// text: qsTr("Timeline")
-// onTriggered: {
-
-// }
-// Action {
-// text: qsTr("Conversations")
-// onTriggered:{
-// //newsModel.clear();
-// newstab.newstabstatus="Conversations";
-// Newsjs.chatsfromdb(db,root.login,function(news){showNews(news)})
-// }
-// }
-// Action {
-// text: qsTr("Favorites")
-// onTriggered:{
-// newsStack.updateMethodNews="refresh";
-// newstab.newstabstatus="Favorites";
-// Service.updateView("Favorites")
-// }
-// }
-// Action {
-// text: qsTr("Replies")
-// onTriggered:{
-// newsStack.updateMethodNews="refresh";
-// newstab.newstabstatus="Replies";
-// Service.updateView("Replies")
-// }
-// }
-// Action {
-// text: qsTr("Public timeline")
-// onTriggered:{
-// newsStack.updateMethodNews="refresh";
-// newstab.newstabstatus="Public Timeline";
-// Service.updateView("Public Timeline")
-// }
-// }
-
-//// Action {
-//// text: qsTr("Direct Messages")
-//// onTriggered:{
-//// newsStack.updateMethodNews="refresh";
-//// newstab.newstabstatus="Direct Messages";
-//// Service.updateView("Direct Messages")
-//// }
-//// }
-//// Action {
-//// text: qsTr("Notifications")
-//// onTriggered:{
-//// newsStack.updateMethodNews="refresh";
-//// newstab.newstabstatus="Notifications";
-//// Service.updateView("Notifications")
-//// }
-//// }
-// Action {
-
-// text: qsTr("Group news")
-// onTriggered:
-// {
-// newsStack.updateMethodNews="refresh";
-// Service.showGroups();
-// }
-// }
-// Action {
-
-// text: qsTr("Settings")
-// onTriggered:
-// {
-// leftDrawer.open()
-// }
-// }
-
-// Action {
-// text: qsTr("Quit")
-// onTriggered:{
-// Service.cleanNews(root.db,function(){
-// Service.cleanContacts(root.login,root.db,function(){
-// Qt.quit()})
-// })
-// }
-// }
-// }
-// }
-
-// Row{
-// spacing: mm
-// anchors.top: parent.top
-// anchors.topMargin: 0.5*mm
-// anchors.right: parent.right
-
-// Button {
-// id: searchButton
-// height: 8*mm
-// text: "\uf002"
-// visible: newsStack.parent.stacktype=="standard"
-// onClicked: {
-// newsView.anchors.topMargin=18*mm;
-// var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml");
-// var searchItem = component.createObject(newsStack,{y:8*mm,width:root.width,height: 8*mm});
-// }
-// }
-
-// Button {
-// id: newMessageButton
-// text: "\uf040"
-// height: 8*mm
-// onClicked: {
-// var groups=[];
-// Helperjs.readData(root.db,"groups",root.login.username,function(groupobject){
-// groups=groupobject
-// });
-// newstab.newstabstatus="SendMessage";
-// Helperjs.readData(root.db,"contacts",root.login.username,function(friends){
-// newsStack.push("qrc:/qml/newsqml/MessageSend.qml",{"contacts": friends,"login":root.login})
-// },"isFriend",1);
-// }
-// }
-// BlueButton {
-// id: quitButton
-// text: "\uf08b"
-// onClicked: {Service.cleanNews(root.db,function(){
-// Service.cleanContacts(root.login,root.db,function(){
-// Qt.quit() })
-// })}
-// }
-// Button {
-// id: update
-// height: 8*mm
-// text: "\uf021"
-// onClicked: {
-// if (newstab.newstabstatus=="Timeline"){
-// newsStack.updateMethodNews="append"
-// } else {newsStack.updateMethodNews="refresh"}
-// //root.contactLoadType="news";
-// if (newsStack.parent.stacktype=="standard"){
-// Service.updateView(newstab.newstabstatus)
-// }
-// else if (newsStack.parent.stacktype=="directmessage"){
-// Service.updateView("Direct Messages")
-// }
-// else if (newsStack.parent.stacktype=="notifications"){
-// Service.updateView("Notifications")
-// }
-// }
-// }
-
-// }
- Component { id:footerComponent
- Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- width:newsView.width
- height:6*mm
- Text{
- font.pixelSize: 1.5*mm
- anchors.centerIn: parent
- text:qsTr("More")
- }
- MouseArea{anchors.fill:parent
- onClicked:{
- var currentTime= new Date();
- var lastnews_id=newsModel.get(newsModel.count-1).newsitemobject.created_at;
- var messagetype=0;
- switch(newsSwipeview.stacktype){
- case "Home":messagetype=0;break;
- case "DirectMessages": messagetype=1;break;
- case "Notifications":messagetype=2;break;
- case "Replies":messagetype=3;break;
- default:messagetype=0;
- }
- if(newstab.newstabstatus=="Timeline"){
- Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
- var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true, 'options':globaloptions};
- newsWorker.sendMessage(msg);
- },false,lastnews_id)}
- if(newstab.newstabstatus=="Conversations"){
- Newsjs.chatsfromdb(root.db,root.login, messagetype,function(news){
- var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true, 'options':globaloptions};
- newsWorker.sendMessage(msg);
- },lastnews_id)}
-// else if(newstab.newstabstatus=="Contact"){
-// Newsjs.newsfromdb(root.db,root.login, function(news){
-// var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
-// newsWorker.sendMessage(msg);
-// },newsModel.get(newsModel.count-1).newsitemobject.uid,lastnews_id)}
- else if (newstab.newstabstatus=="Notifications"){}
- else{
- //newsStack.appendNews=true;
- xhr.setParam("max_id",newsModel.get(newsModel.count-1).newsitemobject.id-1);
- xhr.get()
- }}
- }
- }
- }
-
-
-
-// Label{
-// text:qsTr(stacktype)
-// font.pixelSize: 3* mm
-// anchors.horizontalCenter: parent.horizontalCenter
-// anchors.margins: mm
-// }
-
- ListView {
- id: newsView
- property real oldContentY:0
- property bool viewdragged: false
- anchors.fill: parent
- anchors.margins: mm
- //anchors.topMargin: 6*mm
-// anchors.leftMargin: mm; anchors.rightMargin: mm
-// anchors.bottomMargin: mm
- clip: true
- spacing: 0
- header: MessageSend{id:messagesend;onHeightChanged: newsView.positionViewAtBeginning()}
- footer: footerComponent
- model: newsModel
- delegate: Newsitem{}
- onDragStarted: oldContentY=contentY
- onDragEnded: {
- if(verticalOvershoot<-5*mm){
- viewdragged=true
- }
- else{
- if((contentY-oldContentY)>15*mm){
- swipeIndicator.visible=false;
- newsSwipeview.height=rootStackItem.height;
- newsSwipeview.y=0;
- rootStackItem.state="fullscreen"
- }
- else if ((contentY-oldContentY)<-15*mm){
- swipeIndicator.visible=true;
- newsSwipeview.height=rootStackItem.height-12*mm;
- newsSwipeview.y=5*mm;
- rootStackItem.state=""
- }
- }
- }
- onViewdraggedChanged: {
- if (viewdragged){
- var onlynew=true;
- newsBusy.running=true;
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- //root.contactLoadType="news";
- if (newsSwipeview.stacktype=="Home"){
- Newsjs.getLastNews(root.login,root.db,function(currentlastnews){
- if (currentlastnews>lastnewsid){
- if(newstab.newstabstatus=="Timeline"){
- try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews)
- })}catch(e){Helperjs.showMessage("Error",e,root)};
- }
- if(newstab.newstabstatus=="Conversations"){
- Newsjs.chatsfromdb(db,root.login,0,function(news,lastid){
- lastnewsid=lastid;
- showNews(news)});
- }
- } else {
- Service.updateView(newstab.newstabstatus)
- }
- });
- }
- else if (newsSwipeview.stacktype=="DirectMessages"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Notifications"){
- Service.updateView("Notifications")
- }
- else if (newsSwipeview.stacktype=="Replies"){
- Service.updateView("Replies")
- }
- viewdragged=false
- }}
- }
-
- ListModel{id: newsModel}
-
- WorkerScript {
- id: newsWorker
- source: "qrc:/js/newsworker.js"
- }
-
- BusyIndicator{
- id: newsBusy
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top:parent.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- }
- Rectangle{
- id:downloadNotice
- property alias text: noticeText.text
- color:"white"
- border.color:"grey"
- z:1
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom:parent.bottom
- anchors.bottomMargin: 2*mm
- width: noticeText.width+2*mm
- height: noticeText.height+2*mm
- visible: (downloadNotice.text!="")
-
- Text{
- id:noticeText
- color: "grey"
- anchors.centerIn: parent
- width: contentWidth
- height: contentHeight
- font.pixelSize: 2*mm
- text:""
- }
- }
-
- Component.onCompleted: {
- //print(newsSwipeview.stacktype);
- root.newstypeSignal.connect(newstypeHandling);
- root.messageSignal.connect(onFriendsMessages);
- root.contactdetailsSignal.connect(showContact);
- root.newsSignal.connect(showNews);
-
- try{newsModel.clear()} catch(e){}
- swipeIndicator.visible=true;
- newsSwipeview.height=rootStackItem.height-12*mm;
- newsSwipeview.y=5*mm;
- rootStackItem.state=""
-
-// xhr.setLogin(login.username+":"+Qt.atob(login.password));
-// xhr.setUrl(login.server);
-// if((newsStack.parent.stacktype=="standard") && (root.news.length>0)){
-// showNews(root.news)
-// }
- //else{
- newstab.newstabstatus=login.newsViewType;
- var messagetype=0;
- switch(newsSwipeview.stacktype){
- case "Home":messagetype=0;break;
- case "DirectMessages": messagetype=1;break;
- case "Notifications":messagetype=2;break;
- case "Replies":messagetype=3;break;
- default:messagetype=0;
- }
- if((login.newsViewType=="Conversations")&&(newsSwipeview.stacktype=="Home")){
- Newsjs.chatsfromdb(db,login,messagetype,function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews);
- })
- }
- else{Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews)
- })}
- //}
- }
- }
-}
diff --git a/source-android/qml/newsqml/NewsTab.qml b/source-android/qml/newsqml/NewsTab.qml
deleted file mode 100644
index 248bee5..0000000
--- a/source-android/qml/newsqml/NewsTab.qml
+++ /dev/null
@@ -1,184 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-//import QtQuick.Controls.Styles 2.3
-//import QtQuick.Dialogs 1.3
-import "qrc:/qml/newsqml"
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/service.js" as Service
-
-Item {
-
-// Connections{
-// target:xhr
-// onError:{
-// Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
-// }
-// onSuccess:{
-// if (api=="/api/statuses/friends_timeline"){
-// // downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
-// //Service.processNews(api,data);
-// if(login.newsViewType=="Timeline"){
-// Newsjs.newsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
-// else{Newsjs.chatsfromdb(db,login.username,function(dbnews){
-// showNews(dbnews);
-// })}
-// }
-// }
-// }
-
-
-
-
- Timer {id:contacttimer; interval: 50; running: false; repeat: false
- onTriggered: {//print("Contacttimer "+JSON.stringify(root.news));
- // downloadNotice.text=downloadNotice.text + "\n contactTimer start "+ Date.now()
- root.newContacts=Newsjs.findNewContacts(root.news,root.contactlist);
- Newsjs.storeNews(login,db,root.news,root)
- }
- }
-
- function showConversation(conversationIndex,newsitemobject){
- if(newsitemobject.messagetype==0 || newsitemobject.messagetype==3){
- xhr.clearParams();
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/conversation/show");
- xhr.setParam("id",newsitemobject.id)
- xhr.get();
- }
- else{
- xhr.clearParams();
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/direct_messages/conversation");
- xhr.setParam("uri",newsitemobject.statusnet_conversation_id)
- xhr.get();
- }
- }
-
-
- function onFriendsMessages(friend){
- newstab.newstabstatus="Contact"
- Newsjs.newsfromdb(db,root.login.username, 0,function(dbnews){
- if (dbnews.length==0){
- Newsjs.newsfromdb(db,login.username,0,function(forumnews){
- showNews(forumnews)
- },friend.url)
- }
- else showNews(dbnews)
- },friend.id)
- }
-
- Label{
- text:"\uf0c9 "
- font.pixelSize: 5* mm
- anchors.left: parent.left
- anchors.margins: mm
- color: "#B0BEC5"
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.open()
- }
- }
- }
- Label{
- text:qsTr(newsSwipeview.stacktype)
- font.pixelSize: 3* mm
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.margins: 2*mm
- }
- SwipeView{
- id: newsSwipeview
- property string stacktype:"Home"
- currentIndex: 0
- width: parent.width
- height: parent.height-6*mm
- y: 5*mm
- function onDirectMessage(friend){currentIndex=2}
-
- transitions: Transition {
- PropertyAnimation { properties: "height";
- easing.type: Easing.InOutQuad
- duration: 1000
- }
- }
-
- onCurrentIndexChanged: {
- switch(currentIndex){
- case 0: stacktype="Home";break;
- case 1: stacktype="Replies";break;
- case 2: stacktype="DirectMessages";break;
- case 3: stacktype="Notifications";break;
- default: stacktype="Home";
- }
- }
- //anchors.fill: parent
- Loader{
- id: friendstimeline
- source:(newsSwipeview.currentIndex==0)? "qrc:/qml/newsqml/NewsStack.qml":""
- //onLoaded: newsSwipeview.stacktype="Home"
- }
- Loader{
- id: replies
- //property string stacktype:"Replies"
- source:(newsSwipeview.currentIndex==1)? "qrc:/qml/newsqml/NewsStack.qml":""
- //onLoaded: newsSwipeview.stacktype="Replies"
- }
- Loader{
- id: directmessages
- property var friend:({})
- source:(newsSwipeview.currentIndex==2)? "qrc:/qml/newsqml/NewsStack.qml":""
- //onLoaded: newsSwipeview.stacktype="DirectMessages"
- }
- Loader{
- id: notifications
- //property string stacktype:"Notifications"
- source:(newsSwipeview.currentIndex==3)? "qrc:/qml/newsqml/NewsStack.qml":""
- //onLoaded: newsSwipeview.stacktype="Notifications"
- }
- Component.onCompleted: {root.directmessageSignal.connect(onDirectMessage);}
- }
-
- PageIndicator {
- id: swipeIndicator
- count: newsSwipeview.count
- currentIndex: newsSwipeview.currentIndex
-
- anchors.bottom: newsSwipeview.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
-}
diff --git a/source-android/qml/newsqml/NewsVideo.qml b/source-android/qml/newsqml/NewsVideo.qml
deleted file mode 100644
index cce6012..0000000
--- a/source-android/qml/newsqml/NewsVideo.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtMultimedia 5.8
-import QtQuick 2.9
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles 1.4
-
-Rectangle{
- color:"black"
- //border.color: "light grey"
- width:newscolumn.width;
- height:newscolumn.width/4*3//video.hasVideo?newscolumn.width/4*3:10*mm
- property alias source:video.source
- Text{
- id:noticeText
- text:"\uf144";
- color:"light grey"
- width:parent.width
- font.pixelSize: parent.height/2
- x:parent.width/2-parent.height/4
- y:parent.height/5
- visible: video.playbackState!=MediaPlayer.PlayingState
- }
-
- Video {id:video;
- anchors.fill:parent
- property string mimetype:""
- onErrorChanged:{noticeText.font.pixelSize=3*mm;noticeText.text=errorString}
- fillMode: Image.PreserveAspectFit;
- autoLoad: false
- audioRole: MediaPlayer.VideoRole
- MouseArea {anchors.fill:parent;
- onClicked:{if(video.playbackState!=MediaPlayer.PlayingState){
- video.play()} else{video.pause()}
- }
- }
- }
- ProgressBar{
- id: videoProgress
- width: parent.width
- height: 2*mm
- anchors.top: video.bottom
- z:2
- visible:video.playbackState!=MediaPlayer.StoppedState
- value: video.position/video.duration
- }
- ProgressBar{
- id: videoBuffer
- width: parent.width
- height: 2*mm
- anchors.top: video.bottom
- visible:video.playbackState!=MediaPlayer.StoppedState
- value: video.bufferProgress
- style:ProgressBarStyle{
- progress: Rectangle{
- color:"light grey"
- }
- }
- }
-// Slider{ id: videoSlider
-// width: parent.width
-// height: 3*mm
-// anchors.top: video.bottom
-// visible:video.playbackState!=MediaPlayer.StoppedState && video.seekable
-// value: video.position/video.duration
-// onPressed:video.seek(value*video.duration)
-// }
-}
diff --git a/source-android/qml/newsqml/NewsYplayer.qml b/source-android/qml/newsqml/NewsYplayer.qml
deleted file mode 100644
index 11d01c2..0000000
--- a/source-android/qml/newsqml/NewsYplayer.qml
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.8
-import "qrc:/js/helper.js" as Helperjs
-//import QtWebView 1.1
-
-Rectangle{
- color:"transparent"
- width:newscolumn.width;
- height:newscolumn.width/4*3
- property string url:""//htmlview.text
- WebView {
- id: webView
- anchors.fill: parent
- opacity: 0
-
- url: "qrc:///content/player.html?" + currentVideo.vId
-
- Behavior on opacity { NumberAnimation { duration: 200 } }
-
- onLoadingChanged: {
- switch (loadRequest.status)
- {
- case WebView.LoadSucceededStatus:
- opacity = 1
- return
- case WebView.LoadStartedStatus:
- case WebView.LoadStoppedStatus:
- break
- case WebView.LoadFailedStatus:
- topInfo.text = "Failed to load the requested video"
- break
- }
- opacity = 0
- }
- onTitleChanged: {
- currentVideo.status = 1 * title
- if (title == videoStatus.paused || title == videoStatus.ready)
- panel.state = "list"
- else if (title == videoStatus.playing)
- panel.state = "hidden"
- }
- }
- Text{id:htmlview
- textFormat:Text.RichText
- }
-// WebView {id:htmlview;
-// anchors.fill: parent
-// }
- Component.onCompleted:{
-
-// Helperjs.friendicaWebRequest(url,parent,function(document){
-// print(document);
-
-//// var metas = document.getElementsByTagName('meta'); //get all the meta tag elements
-//// //iterate through them
-//// for (i=0; i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-//import QtQuick.Controls.Styles 1.4
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Item {
- id: newsitem
- width: parent.width
- height:toprow.height+friendicaActivities.height+controlrow.height+1//Math.max((itemMessage.height+topFlow.height+friendicaActivities.height+4*mm),profileImage.height+user_name.height+mm)
- property int itemindex: index
-
- property string attending: ""
- onAttendingChanged: {attendLabel.visible=true;
- attendLabel.text= qsTr("attending: ")+ qsTr(attending)}
-
- signal replyto(string parent_id)
-
- function showActivityContacts(contacts){
- var component = Qt.createComponent("qrc:/qml/newsqml/FriendicaActivities.qml");
- var imagedialog = component.createObject(friendicaActivities,{"activitymembers": contacts});
- }
-
- function findTags(fulltext){
- return fulltext.match(/\s+[#]+[A-Za-z0-9-_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+/g)
- }
-
- Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; color:"light grey"}
-
- Rectangle{
- width:newsitem.width
- height:newsitem.height-1
- color: "white"//(newsitemobject.messagetype==1)?"#ffe6e6" : "white"
-
- Row{id:toprow
- Column {
- id: authorcolumn
- width: 8*mm
-
- Image {
- id:profileImage
- source: ((newsitemobject.user.profile_image!="") && (typeof(newsitemobject.user.profile_image)=="string"))? "file://"+newsitemobject.user.profile_image : newsitemobject.user.profile_image_url
- x:1
- width: 7*mm
- height: 7*mm
- MouseArea{
- anchors.fill: parent
- onClicked:{
- showContact(newsitemobject.user)}
- }
- onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
- Label {
- id:user_name
- color: "grey"
- width:parent.width
- font.pixelSize: 1.5*mm
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- text: newsitemobject.user.name+forumname
- }
- }
- Column {
- id:newscolumn
- width: newsitem.width-8*mm
-
- Flow{
- id:topFlow
- spacing: mm
- width:parent.width
- Label {
- id:messageTypeLabel
- color: "grey"
- text: if (newsitemobject.messagetype==1){ qsTr("Direct Message")} else if(newsitemobject.messagetype==2) {" Notification"} else {qsTr("Source: ")+newsitemobject.source}
- font.pixelSize: 1.5*mm
- }
- Label {
- id:createdAtLabel
- color: "grey"
- font.pixelSize: 1.5*mm
- horizontalAlignment: Label.AlignRight
- text: dateDiff
- }
- Label {
- id:replytoLabel
- color: "grey"
- font.pixelSize: 1.5*mm
- font.family: "Noto Sans"
- horizontalAlignment: Label.AlignRight
- text: try {qsTr("In reply to ")+newsitemobject.reply_user.screen_name
- }catch(e){" "}
- }
-
- Label {
- id:newscountLabel
- visible:((newstabstatus=="Conversations")&&(newsitemobject.newscount>1))?true:false
- color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- font.bold: true
- horizontalAlignment: Label.AlignRight
- text: try {(newsitemobject.newscount-1)+qsTr(" comments") }catch(e){" "}
- MouseArea{
- anchors.fill:parent
- onClicked: {
- newsStack.push("qrc:/qml/newsqml/Conversation.qml");
- showConversation(index,newsitemobject)
- }
- }
- }
- }
-
-
- Column{ id: messageColumn
- //anchors.top:topFlow.bottom
- width:parent.width
- spacing:mm
- clip:true
- height: Math.min(implicitHeight,3/4*root.height)
- MouseArea{
- width: newsitem.width-8*mm-2
- height: itemMessage.height
- onPressAndHold: {
- newsStack.push("qrc:/qml/newsqml/Conversation.qml");
- showConversation(index,newsitemobject)
- }
- Text {
- color: "#404040"
- linkColor: "light green"
- id: itemMessage
- textFormat: Text.RichText
- font.family: "Noto Sans"
- text: newsitemobject.statusnet_html//newsitemobject.attachmentList.length>0?newsitemobject.text : newsitemobject.statusnet_html
- width: newsitem.width-8*mm-2
- height: implicitHeight
- wrapMode: Text.Wrap
- clip:true
- //MouseArea{anchors.fill:parent;onClicked: print("Test")}
- onLinkActivated:{
- Qt.openUrlExternally(link)}
- Component.onCompleted:{
- if (newsitemobject.messagetype==0){
- var hashtags=[];
- hashtags=findTags(newsitemobject.text);
- var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml");
- for (var tags in hashtags){
- var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()});
- }}
-
- if (newsitemobject.attachmentList.length>0){
- for(var attachments in newsitemobject.attachmentList){// (newsitemobject.attachmentList[attachments].url);
- if(newsitemobject.attachmentList[attachments].mimetype.substring(0,5)=="image"){
- var component = Qt.createComponent("qrc:/qml/newsqml/NewsImage.qml");
- var imageQml = component.createObject(messageColumn,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype});
- }
- else if(newsitemobject.attachmentList[attachments].mimetype=="text/html"){
- var component = Qt.createComponent("qrc:/qml/newsqml/NewsLink.qml");
- var linkQml = component.createObject(messageColumn,{"url":newsitemobject.attachmentList[attachments].url});
- }
- else {//print(newsitemobject.attachmentList[attachments].url+" Type: "+newsitemobject.attachmentList[attachments].mimetype)
- var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideo.qml");
- var videoQml = component.createObject(messageColumn,{"source":newsitemobject.attachmentList[attachments].url,"mimetype":newsitemobject.attachmentList[attachments].mimetype});
- }
- }
- }
- }
- }}
- }
- BlueButton{
- width: newsitem.width-8*mm-2
- height:5*mm
- //anchors.bottom: messageColumn.bottom//itemMessage.bottom
- visible: messageColumn.implicitHeight>3/4*root.height//itemMessage.implicitHeight>3/4*root.height
- text:"\uf078"
- fontColor:"grey"
- border.color: "transparent"
- color:"white"
-// gradient: Gradient {
-// GradientStop { position: 0.0; color: "transparent" }
-// GradientStop { position: 0.5; color: "white" }
-// }
- radius:0
- onClicked: {
- if (text=="\uf078"){
- messageColumn.height=messageColumn.implicitHeight+10*mm;text="\uf077"
- } else {
- messageColumn.height=Math.min(messageColumn.implicitHeight,3/4*root.height);
- text="\uf078";
- newsView.positionViewAtIndex(index,ListView.Beginning);
- }
- }
- }
- }
- }
- Flow{
- id:friendicaActivities
- anchors.top:toprow.bottom
- width:parent.width
- spacing:mm
-
- Label{color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- text: friendica_activities.likeText
- MouseArea{
- anchors.fill: parent
- onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
- }
- }
- Label{color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- text: friendica_activities.dislikeText
- MouseArea{
- anchors.fill: parent
- onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
- }
- }
- Label{color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- text: friendica_activities.attendyesText
- MouseArea{
- anchors.fill: parent
- onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
- }}
- Label{color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- text: friendica_activities.attendnoText
- MouseArea{
- anchors.fill: parent
- onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
- }
- }
- Label{color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- text: friendica_activities.attendmaybeText
- MouseArea{
- anchors.fill: parent
- onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)}
- }
- }
- Label{
- id:attendLabel
- color: "grey"
- height:3.5*mm
- font.pixelSize: 1.5*mm
- horizontalAlignment: Label.AlignRight
- text: (friendica_activities.self.attending)?(qsTr("Attending: ")+ qsTr(friendica_activities.self.attending)):""
- }
- }
- Row{id:controlrow
- anchors.top:friendicaActivities.bottom
-
- CheckBox{
- id:likeCheckbox
- width:10*mm
- visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false
- checked:(friendica_activities.self.liked==1)?true:false
- //style: CheckBoxStyle {
- indicator: Rectangle{
- implicitWidth: 10*mm
- implicitHeight:3*mm
- Text{
- anchors.centerIn: parent
- font.pixelSize: 2.5*mm
- font.family:fontAwesome.name
- color:likeCheckbox.checked?"black": "grey"
- text:likeCheckbox.checked?"\uf118"+"!":"\uf118"
- }
- }
- //}
- onClicked: {
- if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false; model.friendica_activities.self.liked=0 }
- else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root); model.friendica_activities.self.liked=1}}
- }
- CheckBox{
- id: dislikeCheckbox
- width:10*mm
- visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false
- checked: (friendica_activities.self.disliked==1)?true:false
- //style: CheckBoxStyle {
- indicator: Rectangle{
- implicitWidth: 10*mm
- implicitHeight:3*mm
- Text{
- anchors.centerIn: parent
- font.pixelSize: 2.5*mm
- font.family:fontAwesome.name
- color:dislikeCheckbox.checked?"black": "grey"
- text: dislikeCheckbox.checked?"\uf119"+"!":"\uf119"
- }
- }
- //}
- onClicked: {
- if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false; model.friendica_activities.self.disliked=0}
- else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root); model.friendica_activities.self.disliked=1}}
- }
-
- CheckBox {
- id:favoritedCheckbox
- visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))
- width: 10*mm
- //style: CheckBoxStyle {
- indicator:Rectangle{
- x:4*mm
- width: 3*mm
- implicitHeight:4*mm
- Text{
- color: favoritedCheckbox.checked?"black":"grey"
- font.pixelSize: 2.5*mm
- text:"\uf005"
- }
- }
- //}
- checked:(newsitemobject.favorited>0)
- onClicked:{
- if(favoritedCheckbox.checkedState==Qt.Checked){
- Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1}
- else if(favoritedCheckbox.checkedState==Qt.Unchecked){
- Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0}
- }
- }
- Rectangle{
- width: 10*mm
- height: 4*mm
- visible:(newsitemobject.messagetype!==2)
- color:"transparent"
- Text{
- id:newsmenusymbol
- color: "grey"
- anchors.centerIn: parent
- font.pixelSize: 2.5*mm
- font.family:fontAwesome.name
- text: "\uf142"
- }
- MouseArea{
- anchors.fill:parent
- onClicked: {newsmenu.popup()}}
- }
- Rectangle{
- width: 10*mm
- height: 4*mm
- visible:(newsitemobject.messagetype!==2)&&(newstab.newstabstatus!="Conversation")
- color:"transparent"
- Text{
- id:conversationsymbol
- color: "grey"
- anchors.centerIn: parent
- font.pixelSize: 2.5*mm
- font.family: fontAwesome.name
- text: "\uf086"
- }
- MouseArea{
- anchors.fill:parent
- onClicked:{
- //conversationsymbol.color="black";
-// var component = Qt.createComponent("qrc:/qml/newsqml/Conversation.qml");
-// var conversationItem = component.createObject(friendicaActivities);
- newsStack.push("qrc:/qml/newsqml/Conversation.qml")
- showConversation(index,newsitemobject)
- }
- }
- }
-
- }
-
- Menu {
- id:newsmenu
- width: 30*mm
- delegate: MenuItem{
- contentItem: Text{
- font.pixelSize: 3*mm
- text: parent.text
- }
- }
- Action{
- text: qsTr("Reply")
- onTriggered: {
- var directmessage=0;
- if (newsitemobject.messagetype==1){ directmessage=1}
- replySignal(newsitemobject)
- //newsStack.push("qrc:/qml/newsqml/MessageSend.qml",{"reply_to_user": newsitemobject.user.screen_name,"parentId":newsitemobject.id,"login":root.login,"directmessage":directmessage});
- }
- }
- Action {
- text: qsTr("DM")
- onTriggered: {
- root.directmessageSignal(newsitemobject.user.screen_name);
- }
- }
- Action {
- text: qsTr("Repost")
- onTriggered: {
- Newsjs.retweetNews(root.login,db,newsitemobject.id,root,function(reply){
- Helperjs.showMessage("Repost",qsTr("Success!"),root)
- })
- }
- }
- Action {
- text: qsTr("Conversation")
- onTriggered: {
- conversationsymbol.color="black";
- var component = Qt.createComponent("qrc:/qml/newsqml/Conversation.qml");
- var conversationItem = component.createObject(friendicaActivities,{"news":newsitemobject.chatArray});
- showConversation(index,newsitemobject)
- }
- }
-
- Menu{
- title: qsTr("Attending")
- width: 20*mm
- delegate: MenuItem{
- contentItem: Text{
- font.pixelSize: 3*mm
- text: parent.text
- }
- }
- Action{
- text:qsTr("yes")
- onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.id,root,function(){
- model.friendica_activities.self.attending="yes";attending="yes"})
- }
- }
- Action{text:qsTr("maybe")
- onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.id,root,function(){
- model.friendica_activities.self.attending="maybe";attending="maybe"})
- }
- }
- Action{text:qsTr("no")
- onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.id,root,function(){
- model.friendica_activities.self.attending="no";attending="no"})}
- }
- }
-
- Action {
- text: qsTr("Delete")
- onTriggered: {
- Newsjs.deleteNews(root.login,root.db,newsitemobject.id,newsitemobject.messagetype,root,function(reply){
- var msg = {'deleteId': index, 'model': newsModel};
- newsWorker.sendMessage(msg);
- })
- }
- }
-
- //MenuItem{
- // text:qsTr("Show on website")
- // onTriggered:Qt.openUrlExternally(login.server+"/display/"+newsitemobject
- //}
- }
-}}
diff --git a/source-android/qml/newsqml/PermissionDialog.qml b/source-android/qml/newsqml/PermissionDialog.qml
deleted file mode 100644
index 23aa704..0000000
--- a/source-android/qml/newsqml/PermissionDialog.qml
+++ /dev/null
@@ -1,229 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.3
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:permissionDialog
- x: mm
- width: messageColumn.width-3*mm
- height:root.height/3
- function updatePerms(){
- for (var i=0;i-1){contactstatus="positive"}
- else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"}
- contactModel.append({"contact":contacts[name],"contactstatus":contactstatus})
- }},"isFriend",1);
-
- Helperjs.readData(db,"groups",login.username,function(owngroups){
- for (var number in owngroups){
- var groupstatus= "neutral";
- if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"}
- else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"}
- groupModel.append({"group":owngroups[number],"groupstatus":groupstatus})
- }});
- }
-}
diff --git a/source-android/qml/newsqml/SmileyDialog.qml b/source-android/qml/newsqml/SmileyDialog.qml
deleted file mode 100644
index 6083755..0000000
--- a/source-android/qml/newsqml/SmileyDialog.qml
+++ /dev/null
@@ -1,242 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import QtQuick.Layouts 1.11
-//import QtQuick.Controls.Styles 1.4
-import "qrc:/js/smiley.js" as Smileyjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:smileyDialog
- x: mm
- width: messageColumn.width-5*mm
- height:root.height/2
-
- Button{
- id:closeButton
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- onClicked:{smileyDialog.visible=false}
- }
-
-
- TabBar {
- id: smileybar
- width: parent.width
- height: 9*mm
- position:TabBar.Header
- TabButton {
- text:qsTr("Unicode")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Standard")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Addon")
- font.pixelSize: 2*mm
- }
-
- TabButton {
- text: qsTr("Adult")
- font.pixelSize: 2*mm
- }
- }
-
-
- StackLayout{
- id:smileyTabView
- currentIndex: smileybar.currentIndex
- anchors.top: closeButton.bottom
- anchors.topMargin: 1*mm
- width: smileyDialog.width-2*mm
- height: smileyDialog.height-7*mm
-// style: TabViewStyle {
-// frameOverlap: 1
-// tab: Rectangle {
-// color: "white"
-// implicitWidth: smileyTabView.width/4-2*mm
-// implicitHeight: 4*mm
-// Text { id: text
-// anchors.centerIn: parent
-// text: styleData.title
-// color: "dark grey"
-// font.pixelSize:2.5*mm
-// font.bold: styleData.selected
-// }
-// }
-// frame: Rectangle { color: "light grey" }
-// tabsAlignment:Qt.AlignHCenter
-// }
-
- Rectangle{
- id: htmlGridTab
- GridView {
- id:htmlView
- anchors.fill: parent
- cellWidth: 5*mm
- cellHeight: 5*mm
- clip: true
- model: htmlModel
- delegate: htmlItem
- }
-
- ListModel{
- id:htmlModel
- }
- Component.onCompleted:{
- for (var icon in Smileyjs.html){
- htmlModel.append({"emoji":Smileyjs.html[icon]})
- }
- }
- }
-
- Rectangle{
- id: coreGridTab
- GridView {
- id: coreSmileyView
- anchors.fill: parent
- cellWidth: 5*mm
- cellHeight: 5*mm
- clip: true
- model: coreSmileyModel
- delegate: smileyItem
- }
-
- ListModel{
- id: coreSmileyModel
- }
-
- Component.onCompleted:{
- var smileyarray=Smileyjs.core
- for (var icon in smileyarray){
- coreSmileyModel.append({"emoji":smileyarray[icon]})
- }
- }
- }
-
- Rectangle{
- id: addonGridTab
- GridView {
- id: addonView
- anchors.fill: parent
- cellWidth: 5*mm
- cellHeight: 5*mm
- clip: true
- model: addonModel
- delegate: smileyItem
- }
-
- ListModel{
- id: addonModel
- }
- Component.onCompleted:{
- for (var icon in Smileyjs.addon){
- addonModel.append({"emoji":Smileyjs.addon[icon]})
- }
- }
- }
-
-
- Rectangle{
- id: adultGridTab
- GridView {
- id: adultView
- anchors.fill: parent
- cellWidth: 5*mm
- cellHeight: 5*mm
- clip: true
- model: adultModel
- delegate: smileyItem
- }
-
- ListModel{
- id: adultModel
- }
- Component.onCompleted:{
- for (var icon in Smileyjs.adult){
- adultModel.append({"emoji":Smileyjs.adult[icon]})
- }
- }
- }
-
-
-
-
- }
- Component{
- id:smileyItem
- AnimatedImage{id:smileyImage
- width:4.5*mm
- height: 4.5*mm
- fillMode:Image.PreserveAspectFit
- source:emoji.url
-
- MouseArea{
- anchors.fill: parent
- onClicked:{
- //bodyField.append(emoji.name+" ")
- bodyField.insert(bodyField.cursorPosition,emoji.name+" ");
- smileyDialog.visible=false
- }
- }
- }
- }
-
- Component{
- id:htmlItem
- Text{id:smileText
- width:4.5*mm
- height: 4.5*mm
- textFormat:Text.RichText
- font.pixelSize: 4*mm
- text: emoji
-
- MouseArea{
- anchors.fill: parent
- onClicked:{
- //bodyField.append(emoji.name+" ")
- bodyField.insert(bodyField.cursorPosition,emoji+" ");
- smileyDialog.visible=false
- }
- }
- }
- }
- }
diff --git a/source-android/qml/photoqml/ImageUploadDialog.qml b/source-android/qml/photoqml/ImageUploadDialog.qml
deleted file mode 100644
index 9302135..0000000
--- a/source-android/qml/photoqml/ImageUploadDialog.qml
+++ /dev/null
@@ -1,306 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.5
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/image.js" as Imagejs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:imageDialog
- property var attachImageURLs: []
- property string imageId: ""
- property string currentAlbum:""
- property var contacts: []
- property var groups: []
- property var contact_allow:login.permissions[0]
- property var contact_deny:login.permissions[1]
- property var group_allow:login.permissions[2]
- property var group_deny:login.permissions[3]
- property int imageNo: 0
-
- function uploadSelectedImage(inumber){
- xhr.url= login.server + "/api/friendica/photo/create.json";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.clearParams();
- xhr.setParam("desc",imageUploadModel.get(inumber).description);
- xhr.setParam("album", album.currentText);
- //if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
- //if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
- //if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
- //if (contact_deny.length>0) {xhr.setParam("contact_deny", Helperjs.cleanArray(contact_deny))};
- xhr.setImageFileParam("media", imageUploadModel.get(inumber).imageUrl );
- xhr.post();
- }
-
-
-function updateImage(){
- xhr.url= login.server + "/api/friendica/photo/update.json";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.clearParams();
- xhr.setParam("desc",imageUploadModel.get(0).description);
- xhr.setParam("album", currentAlbum);
- xhr.setParam("album_new", album.currentText);
- xhr.setParam("photo_id", imageId);
- xhr.post();
- }
-
-
- function attachImage(url){
- imageUploadModel.append({"imageUrl":url,"description":""})
- }
-
- //border.color: "grey"
- y:1
- width:root.width-mm
- height:root.height-5*mm
- property string directory: ""
-
- Connections{
- target:xhr
- onError:{print(data)}//if (data=="image"){Helperjs.showMessage()}}
- onSuccess:{
- if (imageId==""){
- imageNo=imageNo+1;
- if(imageNo0){
- uploadSelectedImage(0)
- }}
- }
- }
- ProgressBar{
- id: newimageProgress
- width: 15*mm
- height: buttonRow.height
- anchors.top: parent.top
- anchors.right:buttonRow.left
- anchors.rightMargin:mm
- visible: false
- value: imageNo/imageUploadModel.count
- }
-
- Component.onCompleted:{
- albumModel.append({"text":""});
- try{Helperjs.readField("album",db,"imageData",login.username,function(storedAlbums){
- for (var n in storedAlbums){
- albumModel.append({"text":storedAlbums[n]})}
- })}
- catch (e){print(e)}
- if(attachImageURLs.length>0){
- for (var n in attachImageURLs){attachImage(attachImageURLs[n])}
- }
- }
-}
diff --git a/source-android/qml/photoqml/PhotoComponent.qml b/source-android/qml/photoqml/PhotoComponent.qml
deleted file mode 100644
index 0ba343a..0000000
--- a/source-android/qml/photoqml/PhotoComponent.qml
+++ /dev/null
@@ -1,148 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.5
-import QtQuick.Controls 1.2
-import "qrc:/qml/photoqml"
-
-Package {
- Item { id: stackItem; Package.name: 'stack'; z: stackItem.PathView.z;width:16.5*mm;height:16.5*mm}
- Item { id: listItem; Package.name: 'list'; width: root.width-1*mm; height: root.height-8*mm; }
- Item { id: gridItem; Package.name: 'grid';}
-
- Item {
- id: photoWrapper
- width: 16.5*mm; height: 16.5*mm
- z: stackItem.PathView.z
- property string hqphotolink: photoLink
- property string imageId:""
-
- Rectangle {
- id: placeHolder
- color: 'lightblue'; antialiasing: true
- anchors.fill:parent
- }
- BusyIndicator { anchors.centerIn: parent; running: realImage.status != Image.Ready }
- Image {
- id: realImage;
- visible: (albumWrapper.state != '')||(index==0)
- width: photoWrapper.width; height: photoWrapper.height
- antialiasing: true;
- asynchronous: true
- autoTransform:true
- cache: false
- fillMode: Image.PreserveAspectFit;
- source: (albumWrapper.state == '')&&(index>0)?"":imageLocation
- }
- Rectangle{
- id:phototextRectangle
- color:"black"
- z:3
- opacity: 0.5
- width:phototext.contentWidth
- height: phototext.contentHeight
- anchors.bottom: photoWrapper.bottom
- }
- Text {
- id:phototext
- z:4
- text: photoDescription.trim()
- width:15*mm
- anchors.bottom: photoWrapper.bottom
- color: "white"
- font.pixelSize: 2*mm
- wrapMode:Text.Wrap
- }
- MouseArea {
- width: realImage.paintedWidth; height: realImage.paintedHeight; anchors.centerIn: realImage
- onPressAndHold:{
- var menuString="import QtQuick 2.5;import QtQuick.Controls 1.4; "+
- "Menu {MenuItem {text:qsTr('Delete on client and server'); onTriggered: {"+
- "changeimage('delete','image','"+imageLocation+"');photoModel.remove(index)}}"+
- "MenuItem {text:qsTr('Move to album'); onTriggered: {"+
- "changeimage('update','image','"+imageId+"');}}"+
- "}";
- var imagemenuObject=Qt.createQmlObject(menuString,photoWrapper,"imagemenuOutput")
- imagemenuObject.popup()
- }
- onClicked: {
- if (albumWrapper.state == 'inGrid') {
- gridItem.GridView.view.currentIndex = index;
- albumWrapper.state = 'fullscreen';
- listItem.ListView.view.currentIndex=index
- } else {
- gridItem.GridView.view.currentIndex = index;
- albumWrapper.state = 'inGrid'
- }
- }
- }
- PinchArea {
- id:imagePinch
- pinch.target: realImage
- anchors.fill: realImage
- pinch.minimumScale: 0.1
- pinch.maximumScale: 10
- enabled: false
- }
-
- // onStateChanged: print("State"+photoWrapper.state+index)
- states: [
- State {
- name: 'stacked'; when: albumWrapper.state == ''
- ParentChange { target: photoWrapper; parent: stackItem; }//x: 1*mm; y: 1*mm }
- PropertyChanges { target: photoWrapper; opacity: stackItem.PathView.onPath ? 1.0 : 0.0 }
- PropertyChanges { target: phototext; opacity: 0.0 }
- PropertyChanges { target: phototextRectangle; opacity: 0.0 }
- },
- State {
- name: 'inGrid'; when: albumWrapper.state == 'inGrid'
- ParentChange { target: photoWrapper; parent: gridItem; x: 1*mm; y: 1*mm;}
- PropertyChanges { target: phototext; opacity: 1.0 }
- PropertyChanges { target: phototextRectangle; opacity: 0.5 }
- PropertyChanges { target: placeHolder; opacity: 1.0 }
- },
- State {
- name: 'fullscreen'; when: albumWrapper.state == 'fullscreen'
- ParentChange {
- target: photoWrapper; parent: listItem; x: 1; y: 1;
- width: root.width-mm; height: root.height-8*mm
- }
- PropertyChanges { target: placeHolder; opacity: 0.0 }
- PropertyChanges { target: realImage; source: photoWrapper.hqphotolink}
- PropertyChanges { target: phototext; anchors.bottom: realImage.bottom}
- PropertyChanges { target: phototext; width:realImage.width }
- PropertyChanges { target: phototextRectangle; anchors.bottom: realImage.bottom }
- PropertyChanges { target: imagePinch; enabled:true}
- // PropertyChanges { target: realImage; width: Math.min(listItem.width,sourceSize.width);height: Math.min(listItem.height,sourceSize.height) }
- }
- ]
- }
-}
diff --git a/source-android/qml/photoqml/PhotoTab.qml b/source-android/qml/photoqml/PhotoTab.qml
deleted file mode 100644
index 7c54269..0000000
--- a/source-android/qml/photoqml/PhotoTab.qml
+++ /dev/null
@@ -1,305 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.5
-import QtQuick.Controls 2.4
-import QtQml.Models 2.1
-import "qrc:/js/image.js" as Imagejs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/photoqml"
-import "qrc:/qml/genericqml"
-
-
-StackView{
- id: photoStack
- //anchors.fill:parent
- initialItem:Rectangle {
- id:fotorectangle
- anchors.fill:parent
-// y:1
-// width:root.width-mm
-// height:root.height-5*mm
- color: '#fff'
- property var newimages:[]
- property int currentimageno: 0
- property bool remoteContact: false
-
-
- onNewimagesChanged:{
- if(fotorectangle.newimages.length>0){
- //print("newimages "+JSON.stringify(newimages));
- var ownimagelist=[];
- Helperjs.readField("album",root.db,"imageData",root.login.username,function(albums){
- for (var i=0;i1){photoStack.pop()}
- if(!albumgridview.currentItem){root.currentIndex=0}
- if(albumgridview.currentItem.state=='fullscreen'){
- albumgridview.currentItem.state = 'inGrid'}
- else if (albumgridview.currentItem.state == 'inGrid'){albumgridview.currentItem.state=''}
- else{root.currentIndex=0}
- }
- else{
- try {photogroupModel.clear()}catch (e){print(e)}
- if (friend){
- Imagejs.newRequestFriendsAlbumPictures(root.login,friend,fotorectangle,function(albums,remoteAuthBool){
- remoteContact=remoteAuthBool;
- var msg = {'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture':true,'friend':friend}
- photoWorker.sendMessage(msg);
- })
- phototabstatusButton.text=friend.screen_name+qsTr("\'s images")
-
- }
- else {
- Helperjs.readField("album", root.db, "imageData",login.username,function(albums){
- if (albums[0]) {
- var msg = { 'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture': false};
- photoWorker.sendMessage(msg);
- }
- })
- }
- }
- }
-
- function deletepics(method, type,id){
- if(method=="delete"){Imagejs.deleteImage(db,login,type, id,filesystem,root,function(){//showFotos("")
- })}
- }
- function updatepic(method,type,id){
- if(method=="update"){
- Helperjs.readData(db,"imageData",login.username,function(url){
- photoStack.push(
- "qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":[url[0].location+url[0].filename],"imageId":id,"currentAlbum":url[0].album}
- )
- },"id",id)}
- }
-
- function uploadUrls(urls){
- photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":urls})
- }
-
- ProgressBar{
- id: newImagesProgress
- width: 15*mm
- height: updatePhotolist.height
- anchors.top: parent.top
- anchors.right:uploadPhoto.left
- anchors.rightMargin:mm
- visible: false
- value: fotorectangle.currentimageno/fotorectangle.newimages.length
- }
-
- MButton{
- id: uploadPhoto
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right:updatePhotolist.left
- anchors.rightMargin:mm
- height: 6*mm
- width: 8*mm
- text:"\uf0ee"
- onClicked: {
- photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml");
-// var component = Qt.createComponent("qrc:/qml/photoqml/ImageUploadDialog.qml");
-// var imageUpload = component.createObject(fotorectangle);
- }}
-
- MButton{
- id: updatePhotolist
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right:phototabstatusButton.left
- anchors.rightMargin:mm
- height: 6*mm
- width: 8*mm
- text:"\uf0ed"
-
- Menu {
- id:photoupdatemenu
- width:40*mm
- MenuItem {
- text: qsTr("All Images")
- font.pixelSize: 3*mm
- onTriggered: {
- Imagejs.requestList(root.login,root.db, false, fotostab,function(obj){fotorectangle.newimages=obj})}
- }
- MenuItem {
- text: qsTr("Only new")
- font.pixelSize: 3*mm
- onTriggered: {
- Imagejs.requestList(root.login,root.db, true,fotostab,function(obj){fotorectangle.newimages=obj})}
- }
- }
- onClicked: {photoupdatemenu.popup()}
- }
-
- MButton{
- id: phototabstatusButton
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right: parent.right
- anchors.rightMargin:2*mm
- height: 6*mm
- width: Math.max(10*mm,implicitWidth)
- text: fotostab.phototabstatus=="Images"?qsTr("Own Images"):fotostab.phototabstatus
- Menu {
- id:phototabmenu
- width: 40*mm
- MenuItem {
- text: qsTr("Own Images")
- font.pixelSize: 3*mm
- onTriggered: {
- fotostab.phototabstatus="Images";
- // phototabstatusButton.text=qsTr("Own images");
- showFotos(root.login,"")}
- }
- }
- onClicked: {phototabmenu.popup()}
- }
-
-
- DelegateModel{
- id: visualphotoModel
- delegate: PhotogroupComponent{}
- model: photogroupModel
- }
-
- ListModel{
- id: photogroupModel
- }
-
- GridView {
- id: albumgridview
- cellWidth: 17*mm
- cellHeight: 17*mm
- x: mm;y:8*mm
- width: parent.width-2*mm; height: parent.height-9*mm
- clip: true
- model: visualphotoModel.parts.album
- footer:Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- width:12*mm
- height:6*mm
- Text{
- font.pixelSize: 1.5*mm
- anchors.centerIn: parent
- text:qsTr("More")
- }
- MouseArea{anchors.fill:parent
- onClicked:{print(photogroupModel.get(0).foreignPicture);
- var lastalbum_id=photogroupModel.count-1;
- if(photogroupModel.get(photogroupModel.count-1).foreignPicture==true){
- Imagejs.newRequestFriendsAlbumPictures(login,photogroupModel.get(0).friend,fotorectangle,function(albums,remoteAuthBool){
- remoteContact=remoteAuthBool;
- var msg = {'model': photogroupModel,'albums':albums,'firstalbum':lastalbum_id+1,'foreignPicture':true,'friend':photogroupModel.get(0).friend}
- photoWorker.sendMessage(msg)
- })
- }
- else{Helperjs.readField("album",root.db, "imageData",root.login.username,function(albums){
- var msg = { 'model': photogroupModel,'albums':albums,'foreignPicture': false,'firstalbum':lastalbum_id+1};
- photoWorker.sendMessage(msg)})}
- }}}
- }
-
- Rectangle { id: photoBackground; color: 'light grey'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 }
-
- ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false }
-
- MButton {
- id: backButton
- height: 6*mm
- width: 8*mm
- text: "\uf057"
- x: parent.width - backButton.width - 3*mm
- y: -backButton.height - 4*mm
- z:2
- onClicked: {photoBackground.opacity=0}
- }
-
- ListView {anchors.fill: parent; model: visualphotoModel.parts.fullscreen; interactive: false }
- WorkerScript{id: photoWorker;source: "qrc:/js/photoworker.js"}
-
- Component.onCompleted: {
- root.fotoSignal.connect(showFotos);
- root.uploadSignal.connect(uploadUrls);
- root.changeimage.connect(deletepics);
- root.changeimage.connect(updatepic);
- if (fotostab.phototabstatus=="Images"){showFotos(root.login,"")}
- }
- }
-}
diff --git a/source-android/qml/photoqml/PhotogroupComponent.qml b/source-android/qml/photoqml/PhotogroupComponent.qml
deleted file mode 100644
index 0c8ac73..0000000
--- a/source-android/qml/photoqml/PhotogroupComponent.qml
+++ /dev/null
@@ -1,155 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.5
-import QtQuick.Controls 1.3
-import QtQml.Models 2.1
-//import "qrc:/js/service.js" as Service
-import "qrc:/js/image.js" as Imagejs
-import "qrc:/js/helper.js" as Helperjs
-
-Package {
- Item {
- Package.name: 'browser'
- GridView {
- id: photosGridView; model: visualModel.parts.grid; width: albumgridview.width; height: albumgridview.height;y:albumgridview.y
- cellWidth: 16.5*mm; cellHeight: 16.5*mm; interactive: false//anchors.margins:2*mm
- onCurrentIndexChanged: photosListView.positionViewAtIndex(currentIndex, ListView.Contain)
- }
- }
-
- Item {
- Package.name: 'fullscreen'
- ListView {
- id: photosListView; model: visualModel.parts.list; orientation: Qt.Horizontal
- width: albumgridview.width; height: albumgridview.height; //y:albumgridview.y
- //width: parent.width; height: parent.height;
- interactive: false
- onCurrentIndexChanged: photosGridView.positionViewAtIndex(currentIndex, GridView.Contain)
- highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
- }
- }
-
- Item {
- Package.name: 'album'
- id: albumWrapper; width: 16.5*mm; height: 16.5*mm
- DelegateModel {
- id: visualModel; delegate: PhotoComponent { }
- model: photoModel
- }
-
- PathView {
- id: photosPathView;
- model: visualModel.parts.stack;
- pathItemCount: 1
- anchors.centerIn: parent;
- path: Path {
- PathAttribute { name: 'z'; value: 9999.0 }
- PathLine { x: 1; y: 1 }
- PathAttribute { name: 'z'; value: 0.0 }
- }
- }
-
- Rectangle{
- color:"black"
- opacity: 0.5
- width:albumtext.contentWidth
- height: albumtext.contentHeight
- anchors.bottom: albumWrapper.bottom
- }
- Text {
- id:albumtext
- text: albumname
- width:albumWrapper.width-1*mm
- height: albumtext.contentHeight
- wrapMode:Text.Wrap
- color: "white"
- font.family: "Monospace"
- font.pixelSize: 2*mm
- anchors.bottom: albumWrapper.bottom
- }
-
- ListModel{
- id: photoModel
- }
-
- Component.onCompleted:{
- try {photoModel.clear()}catch (e){print(e)}
- if(foreignPicture){
- Imagejs.newRequestFriendsPictures(login,albumlink,friend,photoStack.remoteContact,remoteauth,root,function(obj){
- if (obj) {
- for (var k=0;k
-
-
-
- AccountPage
-
-
-
-
- User
- Name
-
-
-
- Server
- Server
-
-
-
- Nickname
- Kurzname
-
-
-
- Password
- Passwort
-
-
-
- Image dir.
- Bildverz.
-
-
-
- News as
- Anzeige
-
-
-
-
-
- Error
- Fehler
-
-
-
- Nicknames containing @ symbol currently not supported
- Kurznamen mit @ Zeichen werden derzeit nicht unterstützt.
-
-
-
- Confirm
- Bestätigen
-
-
-
- No server given!
- Kein Server angegeben!
-
-
-
- No nickname given!
- Kein Kurzname angegeben!
-
-
-
- No password given!
- Kein Passwort angegeben!
-
-
-
- No image directory given!
- Kein Verzeichnis für Bilder angegeben!
-
-
-
- Wrong password!
- Falsches Passwort!
-
-
-
- Success
- Bestätigt
-
-
-
- Name
- Name
-
-
-
- Timeline
- Chronologisch
-
-
-
- Conversations
- Unterhaltungen
-
-
-
- CalendarTab
-
-
- Events
- Termine
-
-
-
- Own Calendar
- Eigener Kalender
-
-
-
- ConfigPage
-
-
- Max. News
- Max. Nachr.
-
-
-
- Sync
- Autom. Aktualisierung
-
-
-
- ConfigTab
-
- User
- Name
-
-
- Server
- Server
-
-
- Nickname
- Kurzname
-
-
- Password
- Passwort
-
-
- Image dir.
- Bildverz.
-
-
- Max. News
- Max. Nachr.
-
-
- News as
- Anzeige
-
-
- Interval (0=None)
- Intervall (0=keins)
-
-
- Error
- Fehler
-
-
- Nickname not registered at given server!
- Name auf der Seite nicht registriert!
-
-
- Confirm
- Bestätigen
-
-
- No server given!
- Kein Server angegeben!
-
-
- No nickname given!
- Kein Kurzname angegeben!
-
-
- Nickname not registered at given server!
- Name auf der Seite nicht registriert!
-
-
- No username given!
- Kein Nutzername angegeben!
-
-
- Sync Interval (0=None)
- Akt.-intervall (0=keine)
-
-
- Nicknames containing @ symbol currently not supported
- Kurznamen mit @ Zeichen werden derzeit nicht unterstützt.
-
-
- Min.
- Min.
-
-
- No password given!
- Kein Passwort angegeben!
-
-
- No image directory given!
- Kein Verzeichnis für Bilder angegeben!
-
-
- No maximum news number given!
- Maximale News-Anzahl nicht angegeben!
-
-
- Wrong password!
- Falsches Passwort!
-
-
- Success
- Bestätigt
-
-
- Name
- Name
-
-
- Timeline
- Chronologisch
-
-
- Conversations
- Unterhaltungen
-
-
-
- ContactComponent
-
-
- Connect
- Kontaktanfrage
-
-
-
- ContactDetailsComponent
-
-
- Connect
- Kontaktanfrage
-
-
-
- Description
- Beschreibung
-
-
-
- Location
- Ort
-
-
-
- Posts
- Beiträge
-
-
-
- URL
- Profilseite
-
-
-
- Created at
- Erstellt
-
-
-
- ContactPage
-
-
- Connect
- Kontaktanfrage
-
-
-
- Description
- Beschreibung
-
-
-
- Location
- Ort
-
-
-
- Posts
- Beiträge
-
-
-
- URL
- Profilseite
-
-
-
- Created at
- Erstellt
-
-
-
- FriendsTab
-
-
- Me
- Ich
-
-
-
- Friends
- Freunde
-
-
-
- Contacts
- Kontakte
-
-
-
- Groups
- Gruppen
-
-
-
- GroupComponent
-
- Error
- Fehler
-
-
- No name given
- Kein Name angegeben
-
-
-
- ImageUploadDialog
-
-
- Upload to album
- In Album hochladen
-
-
- Album
- Album
-
-
- Image
- Bild
-
-
-
- Description
- Beschreibung
-
-
-
- Upload
- Hochladen
-
-
-
- Change
- Ändern
-
-
-
- Error
- Fehler
-
-
-
- No album name given
- Kein Albumname angegeben
-
-
-
- MessageSend
-
-
-
-
-
- to:
- an:
-
-
-
- Title (optional)
- Überschrift (optional)
-
-
-
- What's on your mind?
- Woran denkst du gerade?
-
-
-
-
- Error
- Fehler
-
-
-
- Only one attachment supported at the moment.
- Remove other attachment first!
- Nur ein Anhang derzeit unterstützt.
- Lösche zuerst den anderen Anhang!
-
-
-
- No receiver supplied!
- Kein Empfänger angegeben!
-
-
-
- NewsStack
-
-
- Network Error
- Netzwerk-Fehler
-
-
-
- More
- Mehr
-
-
-
- NewsTab
-
- Download profile image for
- Lade Profilbild für
-
-
- More
- Mehr
-
-
- Timeline
- Chronologisch
-
-
- Error
- Fehler
-
-
- Favorites
- Markierte News
-
-
- Conversations
- Unterhaltungen
-
-
- Network Error
- Netzwerk-Fehler
-
-
- Replies
- Interaktionen
-
-
- Public timeline
- Gemeinschaft
-
-
- Direct Messages
- Direktnachrichten
-
-
- Notifications
- Meldungen
-
-
- Group news
- News Gruppe
-
-
- Quit
- Schliessen
-
-
-
- Newsitem
-
-
- attending:
- Teilnahme
-
-
-
- Source:
- Quelle:
-
-
-
- Direct Message
- Direktnachricht
-
-
-
- In reply to
- Antwort an
-
-
-
- comments
- Kommentare
-
-
-
- Attending:
- Teilnahme:
-
-
-
- Reply
- Antworten
-
-
-
- DM
- Direktnachricht
-
-
-
- Repost
- Teilen
-
-
-
- Success!
- Erledigt!
-
-
-
- Conversation
- Unterhaltung
-
-
-
- Attending
- Teilnahme
-
-
-
- yes
- ja
-
-
-
- maybe
- vielleicht
-
-
-
- no
- nein
-
-
-
- Delete
- Löschen
-
-
-
- PermissionDialog
-
-
- Friends
- Freunde
-
-
-
- Groups
- Gruppen
-
-
-
- PhotoTab
-
-
- 's images
- s Bilder
-
-
-
- All Images
- Alle Bilder
-
-
-
- Only new
- Nur neue
-
-
-
-
- Own Images
- Eigene Bilder
-
-
-
- More
- Mehr
-
-
-
- ProfileComponent
-
-
- profile name
- Profilname
-
-
-
- is default
- Hauptprofil
-
-
-
- hide friends
- Verberge Freunde
-
-
-
- profile photo
- Profilbild
-
-
-
- profile thumb
- Mini-Profilbild
-
-
-
- publish
- öffentlich
-
-
-
- publish in network
- Öffentlich im Netzwerk
-
-
-
- description
- Beschreibung
-
-
-
- date of birth
- Geburtstag
-
-
-
- address
- Adresse
-
-
-
- city
- Stadt
-
-
-
- region
- Region
-
-
-
- postal code
- Postleitzahl
-
-
-
- country
- Land
-
-
-
- hometown
- Heimatstadt
-
-
-
- gender
- Geschlecht
-
-
-
- marital status
- Beziehungsstatus
-
-
-
- married with
- verheiratet mit
-
-
-
- married since
- verheiratet seit
-
-
-
- sexual
- Sex
-
-
-
- politics
- Politik
-
-
-
- religion
- Religion
-
-
-
- public keywords
- öffentliche Schlagwörter
-
-
-
- private keywords
- private Schlagwörter
-
-
-
- likes
- Vorlieben
-
-
-
- dislikes
- Abneigungen
-
-
-
- about
- über
-
-
-
- music
- Musik
-
-
-
- book
- Bücher
-
-
-
- tv
- TV
-
-
-
- film
- Filme
-
-
-
- interest
- Interessen
-
-
-
- romance
- Liebschaften
-
-
-
- work
- Arbeit
-
-
-
- education
- Bildung
-
-
-
- social networks
- Soziale Netzwerke
-
-
-
- homepage
- Homepage
-
-
-
- Update
- Aktualisieren
-
-
-
- profile id
- Profil-Nummer
-
-
-
- Description
- Beschreibung
-
-
-
- Location
- Ort
-
-
-
- Posts
- Beiträge
-
-
-
- URL
- Profilseite
-
-
-
- Created at
- Erstellt
-
-
-
- SmileyDialog
-
-
- Unicode
- Unicode
-
-
-
- Standard
- Standard
-
-
-
- Addon
- Addon
-
-
-
- Adult
- XXX
-
-
-
- SyncComponent
-
-
- sync
- akt.
-
-
-
- notify
- benachr.
-
-
-
- SyncConfig
-
-
- Sync Interval (0=None)
- Akt.-intervall (0=keine)
-
-
-
- Min.
- Min.
-
-
-
- friendiqa
-
-
- Refresh
- Aktualisieren
-
-
-
- Timeline
- Chronologisch
-
-
-
- Conversations
- Unterhaltungen
-
-
-
- Favorites
- Markierte News
-
-
-
- Replies
- Interaktionen
-
-
-
- Public Timeline
- öff. Timeline
-
-
-
- Group news
- News Gruppe
-
-
-
- Search
- Suche
-
-
-
- Settings
- Einstellungen
-
-
-
- Accounts
- Konten
-
-
-
- Quit
- Schliessen
-
-
-
- newsworker
-
-
- likes this.
- mag das.
-
-
-
- like this.
- mögen das.
-
-
-
- doesn't like this.
- mag das nicht.
-
-
-
- don't like this.
- mögen das nicht.
-
-
-
- will attend.
- nehmen teil.
-
-
-
- persons will attend.
- Personen nehmen teil.
-
-
-
- will not attend.
- nimmt nicht teil.
-
-
-
- persons will not attend.
- Personen nehmen nicht teil.
-
-
-
- may attend.
- nimmt vielleicht teil.
-
-
-
- persons may attend.
- Personen nehmen vielleicht teil.
-
-
-
- yes
- ja
-
-
-
- no
- nein
-
-
-
- maybe
- vielleicht
-
-
-
- seconds
- Sekunden
-
-
-
-
-
-
-
-
-
-
-
-
- ago
- her
-
-
-
- minute
- Minute
-
-
-
- minutes
- Minuten
-
-
-
- hour
- Stunde
-
-
-
- hours
- Stunden
-
-
-
- day
- Tag
-
-
-
- days
- Tage
-
-
-
- month
- Monat
-
-
-
- months
- Monate
-
-
-
- years
-
-
-
-
- service
-
- Error
- Fehler
-
-
-
- Undefined Array Error
- Antwort-Array ungültig
-
-
-
- JSON status Error
- Server-Antwort: Fehler
-
-
-
diff --git a/source-android/translations/friendiqa-es.qm b/source-android/translations/friendiqa-es.qm
deleted file mode 100644
index 8408157..0000000
Binary files a/source-android/translations/friendiqa-es.qm and /dev/null differ
diff --git a/source-android/translations/friendiqa-es.ts b/source-android/translations/friendiqa-es.ts
deleted file mode 100644
index 89d0223..0000000
--- a/source-android/translations/friendiqa-es.ts
+++ /dev/null
@@ -1,1063 +0,0 @@
-
-
-
-
- AccountPage
-
-
-
-
- User
- Usuario
-
-
-
- Server
- Servidor
-
-
-
- Nickname
- Usuario
-
-
-
- Password
- Contraseña
-
-
-
- Image dir.
- Dir. de imágenes
-
-
-
- News as
- Noticias como
-
-
-
-
-
- Error
- Error
-
-
-
- Nicknames containing @ symbol currently not supported
-
-
-
-
- Confirm
- Confirmar
-
-
-
- No server given!
- ¡Servidor no encontrado!
-
-
-
- No nickname given!
- ¡Usuario incorrecto!
-
-
-
- No password given!
- ¡Contraseña incorrecta!
-
-
-
- No image directory given!
- ¡No se ha encontrado el directorio de imágenes!
-
-
-
- Wrong password!
- ¡Contraseña incorrecta!
-
-
-
- Success
- éxito!
-
-
-
- Name
- Nombre
-
-
-
- Timeline
- Cronología
-
-
-
- Conversations
- Conversaciones
-
-
-
- CalendarTab
-
-
- Events
- Eventos
-
-
-
- Own Calendar
- Calendario propio
-
-
-
- ConfigPage
-
-
- Max. News
- Nº Max. de noticias.
-
-
-
- Sync
-
-
-
-
- ConfigTab
-
- User
- Usuario
-
-
- Server
- Servidor
-
-
- Nickname
- Usuario
-
-
- Password
- Contraseña
-
-
- Image dir.
- Dir. de imágenes
-
-
- Max. News
- Nº Max. de noticias.
-
-
- News as
- Noticias como
-
-
- Interval (0=None)
- Intervalo (0=ningún)
-
-
- Error
- Error
-
-
- Confirm
- Confirmar
-
-
- No server given!
- ¡Servidor no encontrado!
-
-
- No nickname given!
- ¡Usuario incorrecto!
-
-
- Nickname not registered at given server!
- ¡Usuario incorrecto!
-
-
- No username given!
- ¡Usuario incorrecto!
-
-
- No password given!
- ¡Contraseña incorrecta!
-
-
- No image directory given!
- ¡No se ha encontrado el directorio de imágenes!
-
-
- No maximum news number given!
- ¡Nº máximo de noticias incorrecto!
-
-
- Wrong password!
- ¡Contraseña incorrecta!
-
-
- Success
- éxito!
-
-
- Name
- Nombre
-
-
- Timeline
- Cronología
-
-
- Conversations
- Conversaciones
-
-
-
- ContactComponent
-
-
- Connect
- Conectar
-
-
-
- ContactDetailsComponent
-
-
- Connect
- Conectar
-
-
-
- Description
- Descripción
-
-
-
- Location
- Localización
-
-
-
- Posts
- Mensajes
-
-
-
- URL
- URL
-
-
-
- Created at
- Creado en
-
-
-
- ContactPage
-
-
- Connect
- Conectar
-
-
-
- Description
- Descripción
-
-
-
- Location
- Localización
-
-
-
- Posts
- Mensajes
-
-
-
- URL
- URL
-
-
-
- Created at
- Creado en
-
-
-
- FriendsTab
-
-
- Me
- Yo
-
-
-
- Friends
- Amigos
-
-
-
- Contacts
- Contactos
-
-
-
- Groups
- Grupos
-
-
-
- ImageUploadDialog
-
-
- Upload to album
- Subir álbum
-
-
- Album
- álbum
-
-
- Image
- imagen
-
-
-
- Description
- Descripción
-
-
-
- Upload
- Subir
-
-
-
- Change
- Cambiar
-
-
-
- Error
- Error
-
-
-
- No album name given
- ¡Nombre del álbum no encontrado!
-
-
-
- MessageSend
-
-
-
-
-
- to:
-
-
-
-
- Title (optional)
- Título (opcional)
-
-
-
- What's on your mind?
-
-
-
-
-
- Error
- Error
-
-
-
- Only one attachment supported at the moment.
- Remove other attachment first!
- Solo se admite adjuntar un solo archivo en este momento.
- ¡Elimine y deje un archivo adjunto!
-
-
-
- No receiver supplied!
-
-
-
-
- NewsStack
-
-
- Network Error
- Fallo de red
-
-
-
- More
- Mas
-
-
-
- NewsTab
-
- Download profile image for
- Descargar la imagen del perfil para
-
-
- More
- Mas
-
-
- Timeline
- Cronología
-
-
- Error
- Error
-
-
- Favorites
- Favoritos
-
-
- Conversations
- Conversaciones
-
-
- Network Error
- Fallo de red
-
-
- Public timeline
- Cronología pública
-
-
- Direct Messages
- Mensaje directo
-
-
- Notifications
- Notificaciones
-
-
- Group news
- Grupos
-
-
- Quit
- Salida
-
-
-
- Newsitem
-
-
- attending:
- Asistiendo:
-
-
-
- Source:
- Fuente:
-
-
-
- Direct Message
- Mensaje directo
-
-
-
- In reply to
- En respuesta a
-
-
-
- comments
- comentarios
-
-
-
- Attending:
- Asistiendo:
-
-
-
- Reply
- Respuesta
-
-
-
- DM
- Mensaje directo
-
-
-
- Repost
- Volver a publicar
-
-
-
- Success!
- éxito!
-
-
-
- Conversation
- Conversación
-
-
-
- Attending
- Asistiendo
-
-
-
- yes
- si
-
-
-
- maybe
- quizás
-
-
-
- no
- no
-
-
-
- Delete
- Borrar
-
-
-
- PermissionDialog
-
-
- Friends
- Amigos
-
-
-
- Groups
- Grupos
-
-
-
- PhotoTab
-
-
- 's images
- s Imágenes
-
-
-
- All Images
- Todas las imagenes
-
-
-
- Only new
- Solo nueva
-
-
-
-
- Own Images
- Mis imágenes
-
-
-
- More
- Mas
-
-
-
- ProfileComponent
-
-
- profile name
- Nombre de perfil
-
-
-
- is default
-
-
-
-
- hide friends
-
-
-
-
- profile photo
-
-
-
-
- profile thumb
-
-
-
-
- publish
-
-
-
-
- publish in network
-
-
-
-
- description
-
-
-
-
- date of birth
-
-
-
-
- address
-
-
-
-
- city
-
-
-
-
- region
-
-
-
-
- postal code
-
-
-
-
- country
-
-
-
-
- hometown
-
-
-
-
- gender
-
-
-
-
- marital status
-
-
-
-
- married with
-
-
-
-
- married since
-
-
-
-
- sexual
-
-
-
-
- politics
-
-
-
-
- religion
-
-
-
-
- public keywords
-
-
-
-
- private keywords
-
-
-
-
- likes
-
-
-
-
- dislikes
-
-
-
-
- about
-
-
-
-
- music
-
-
-
-
- book
-
-
-
-
- tv
-
-
-
-
- film
-
-
-
-
- interest
-
-
-
-
- romance
-
-
-
-
- work
-
-
-
-
- education
-
-
-
-
- social networks
-
-
-
-
- homepage
-
-
-
-
- Update
-
-
-
-
- profile id
-
-
-
-
- Description
- Descripción
-
-
-
- Location
- Localización
-
-
-
- Posts
- Mensajes
-
-
-
- URL
- URL
-
-
-
- Created at
- Creado en
-
-
-
- SmileyDialog
-
-
- Unicode
- Unicode
-
-
-
- Standard
- Standard
-
-
-
- Addon
- Addon
-
-
-
- Adult
- XXX
-
-
-
- SyncComponent
-
-
- sync
-
-
-
-
- notify
-
-
-
-
- SyncConfig
-
-
- Sync Interval (0=None)
-
-
-
-
- Min.
-
-
-
-
- friendiqa
-
-
- Refresh
-
-
-
-
- Timeline
- Cronología
-
-
-
- Conversations
- Conversaciones
-
-
-
- Favorites
- Favoritos
-
-
-
- Replies
-
-
-
-
- Public Timeline
- Cronología pública
-
-
-
- Group news
- Grupos
-
-
-
- Search
- Busca
-
-
-
- Settings
- Ajustes
-
-
-
- Accounts
-
-
-
-
- Quit
- Salida
-
-
-
- newsworker
-
-
- likes this.
- le gusta esto.
-
-
-
- like this.
- me gusta esto.
-
-
-
- doesn't like this.
- no de ése.
-
-
-
- don't like this.
- no me gusta.
-
-
-
- will attend.
- asistirá.
-
-
-
- persons will attend.
- Personas que asistirán.
-
-
-
- will not attend.
- no asistirá.
-
-
-
- persons will not attend.
- Personas que no asistirán..
-
-
-
- may attend.
- Puede asistir.
-
-
-
- persons may attend.
- Personas que pueden asistir.
-
-
-
- yes
- si
-
-
-
- no
- no
-
-
-
- maybe
- quizás
-
-
-
- seconds
- Segundos
-
-
-
-
-
-
-
-
-
-
-
-
- ago
- hace
-
-
-
- minute
- Minuto
-
-
-
- minutes
- Minutos
-
-
-
- hour
- Hora
-
-
-
- hours
- Horas
-
-
-
- day
- Dia
-
-
-
- days
- Dias
-
-
-
- month
- Mes
-
-
-
- months
- Meses
-
-
-
- years
- Años
-
-
-
- service
-
- Error
- Error
-
-
-
- Undefined Array Error
-
-
-
-
- JSON status Error
-
-
-
-
diff --git a/source-android/translations/friendiqa-it.qm b/source-android/translations/friendiqa-it.qm
deleted file mode 100644
index bb3841b..0000000
Binary files a/source-android/translations/friendiqa-it.qm and /dev/null differ
diff --git a/source-android/translations/friendiqa-it.ts b/source-android/translations/friendiqa-it.ts
deleted file mode 100644
index a125f79..0000000
--- a/source-android/translations/friendiqa-it.ts
+++ /dev/null
@@ -1,1039 +0,0 @@
-
-
-
-
- AccountPage
-
-
-
-
- User
- Utente
-
-
-
- Server
- Server
-
-
-
- Nickname
- Utente
-
-
-
- Password
- Password
-
-
-
- Image dir.
- Directory immagini
-
-
-
- News as
- News come
-
-
-
-
-
- Error
- Errore
-
-
-
- Nicknames containing @ symbol currently not supported
-
-
-
-
- Confirm
- Conferma
-
-
-
- No server given!
- Nessun server inserito!
-
-
-
- No nickname given!
- Nessun utente inserito!
-
-
-
- No password given!
- Nessuna password inserita!
-
-
-
- No image directory given!
- Nessuna directory immagini inserita!
-
-
-
- Wrong password!
-
-
-
-
- Success
- Ha funzionato!
-
-
-
- Name
- Nome
-
-
-
- Timeline
- Cronologia
-
-
-
- Conversations
- Conversazioni
-
-
-
- CalendarTab
-
-
- Events
- Eventi
-
-
-
- Own Calendar
- Calendario
-
-
-
- ConfigPage
-
-
- Max. News
- Nº Max. di notizie
-
-
-
- Sync
-
-
-
-
- ConfigTab
-
- User
- Utente
-
-
- Server
- Server
-
-
- Nickname
- Utente
-
-
- Password
- Password
-
-
- Image dir.
- Directory immagini
-
-
- Max. News
- Nº Max. di notizie
-
-
- News as
- News come
-
-
- Interval (0=None)
- Intervallo (0=nessuno)
-
-
- Error
- Errore
-
-
- Confirm
- Conferma
-
-
- No server given!
- Nessun server inserito!
-
-
- No nickname given!
- Nessun utente inserito!
-
-
- No username given!
- Nessun utente inserito!
-
-
- No password given!
- Nessuna password inserita!
-
-
- No image directory given!
- Nessuna directory immagini inserita!
-
-
- No maximum news number given!
- Nessun numero massimo di news inserito!
-
-
- Success
- Ha funzionato!
-
-
- Timeline
- Cronologia
-
-
- Conversations
- Conversazioni
-
-
-
- ContactComponent
-
-
- Connect
- Connetti
-
-
-
- ContactDetailsComponent
-
-
- Connect
- Connetti
-
-
-
- Description
- Descrizione
-
-
-
- Location
- Località
-
-
-
- Posts
- Messaggi
-
-
-
- URL
- URL
-
-
-
- Created at
- Creato il
-
-
-
- ContactPage
-
-
- Connect
- Connetti
-
-
-
- Description
- Descrizione
-
-
-
- Location
- Località
-
-
-
- Posts
- Messaggi
-
-
-
- URL
- URL
-
-
-
- Created at
- Creato il
-
-
-
- FriendsTab
-
-
- Me
-
-
-
-
- Friends
- Amici
-
-
-
- Contacts
- Contatti
-
-
-
- Groups
- Gruppi
-
-
-
- ImageUploadDialog
-
-
- Upload to album
-
-
-
- Album
- Album
-
-
- Image
- Immagine
-
-
-
- Description
- Descrizione
-
-
-
- Upload
- Carica
-
-
-
- Change
-
-
-
-
- Error
- Errore
-
-
-
- No album name given
- Nessun nome album inserito!
-
-
-
- MessageSend
-
-
-
-
-
- to:
-
-
-
-
- Title (optional)
- Titolo (opzionale)
-
-
-
- What's on your mind?
-
-
-
-
-
- Error
- Errore
-
-
-
- Only one attachment supported at the moment.
- Remove other attachment first!
- Solo un allegato è attualmente supportato.
- Rimuovere prima gli altri allegati!
-
-
-
- No receiver supplied!
-
-
-
-
- NewsStack
-
-
- Network Error
-
-
-
-
- More
- Ancora
-
-
-
- NewsTab
-
- Download profile image for
- Download immagine profilo per
-
-
- More
- Ancora
-
-
- Timeline
- Cronologia
-
-
- Error
- Errore
-
-
- Favorites
- Favoriti
-
-
- Conversations
- Conversazioni
-
-
- Direct Messages
- Messaggio diretto
-
-
- Notifications
- Notifiche
-
-
- Group news
- Gruppi
-
-
-
- Newsitem
-
-
- attending:
- attendere:
-
-
-
- Source:
- Codice:
-
-
-
- Direct Message
- Messaggio diretto
-
-
-
- In reply to
- In risposta a
-
-
-
- comments
- commenti
-
-
-
- Attending:
- Attendi:
-
-
-
- Reply
- Risposta
-
-
-
- DM
- Messaggio diretto
-
-
-
- Repost
- Condividi
-
-
-
- Success!
- Ha funzionato!
-
-
-
- Conversation
- Conversazione
-
-
-
- Attending
- Attendi
-
-
-
- yes
- si
-
-
-
- maybe
- potrebbe
-
-
-
- no
- no
-
-
-
- Delete
- Cancella
-
-
-
- PermissionDialog
-
-
- Friends
- Amici
-
-
-
- Groups
- Gruppi
-
-
-
- PhotoTab
-
-
- 's images
- Immagini
-
-
-
- All Images
-
-
-
-
- Only new
-
-
-
-
-
- Own Images
- Mie immagini
-
-
-
- More
- Ancora
-
-
-
- ProfileComponent
-
-
- profile name
-
-
-
-
- is default
-
-
-
-
- hide friends
-
-
-
-
- profile photo
-
-
-
-
- profile thumb
-
-
-
-
- publish
-
-
-
-
- publish in network
-
-
-
-
- description
-
-
-
-
- date of birth
-
-
-
-
- address
-
-
-
-
- city
-
-
-
-
- region
-
-
-
-
- postal code
-
-
-
-
- country
-
-
-
-
- hometown
-
-
-
-
- gender
-
-
-
-
- marital status
-
-
-
-
- married with
-
-
-
-
- married since
-
-
-
-
- sexual
-
-
-
-
- politics
-
-
-
-
- religion
-
-
-
-
- public keywords
-
-
-
-
- private keywords
-
-
-
-
- likes
-
-
-
-
- dislikes
-
-
-
-
- about
-
-
-
-
- music
-
-
-
-
- book
-
-
-
-
- tv
-
-
-
-
- film
-
-
-
-
- interest
-
-
-
-
- romance
-
-
-
-
- work
-
-
-
-
- education
-
-
-
-
- social networks
-
-
-
-
- homepage
-
-
-
-
- Update
-
-
-
-
- profile id
-
-
-
-
- Description
- Descrizione
-
-
-
- Location
- Località
-
-
-
- Posts
- Messaggi
-
-
-
- URL
- URL
-
-
-
- Created at
- Creato il
-
-
-
- SmileyDialog
-
-
- Unicode
- Unicode
-
-
-
- Standard
- Standard
-
-
-
- Addon
- Addon
-
-
-
- Adult
- XXX
-
-
-
- SyncComponent
-
-
- sync
-
-
-
-
- notify
-
-
-
-
- SyncConfig
-
-
- Sync Interval (0=None)
- Intervallo (0=nessuno)
-
-
-
- Min.
- Min.
-
-
-
- friendiqa
-
-
- Refresh
-
-
-
-
- Timeline
- Cronologia
-
-
-
- Conversations
- Conversazioni
-
-
-
- Favorites
- Favoriti
-
-
-
- Replies
-
-
-
-
- Public Timeline
-
-
-
-
- Group news
- Gruppi
-
-
-
- Search
- Cerca
-
-
-
- Settings
- Configurazione
-
-
-
- Accounts
-
-
-
-
- Quit
-
-
-
-
- newsworker
-
-
- likes this.
- mi piace.
-
-
-
- like this.
- mi piace.
-
-
-
- doesn't like this.
- non mi piace.
-
-
-
- don't like this.
- non mi piace.
-
-
-
- will attend.
- attendere.
-
-
-
- persons will attend.
- Persone che attendono.
-
-
-
- will not attend.
- non aspettare.
-
-
-
- persons will not attend.
- Persone che non aspettano.
-
-
-
- may attend.
- puoi attendere.
-
-
-
- persons may attend.
- Persone che possono attendere.
-
-
-
- yes
- si
-
-
-
- no
- no
-
-
-
- maybe
- potrebbe
-
-
-
- seconds
- secondi
-
-
-
-
-
-
-
-
-
-
-
-
- ago
- fa
-
-
-
- minute
- minuti
-
-
-
- minutes
- minuti
-
-
-
- hour
- ora
-
-
-
- hours
- ore
-
-
-
- day
- giorno
-
-
-
- days
- giorni
-
-
-
- month
- mese
-
-
-
- months
- mesi
-
-
-
- years
- anni
-
-
-
- service
-
- Error
- Errore
-
-
-
- Undefined Array Error
-
-
-
-
- JSON status Error
-
-
-
-
diff --git a/source-linux/application.qrc b/source-linux/application.qrc
deleted file mode 100644
index 9e0b393..0000000
--- a/source-linux/application.qrc
+++ /dev/null
@@ -1,236 +0,0 @@
-
-
- qtquickcontrols2.conf
- qml/friendiqa.qml
- qml/newsqml/NewsTab.qml
- qml/newsqml/Newsitem.qml
- qml/newsqml/MessageSend.qml
- qml/newsqml/Conversation.qml
- qml/newsqml/FriendicaActivities.qml
- qml/contactqml/FriendsTab.qml
- qml/contactqml/GroupComponent.qml
- qml/contactqml/ContactComponent.qml
- qml/contactqml/ContactDetailsComponent.qml
- qml/contactqml/Contactlist.qml
- qml/genericqml/BlueButton.qml
- qml/photoqml/PhotoComponent.qml
- qml/photoqml/PhotogroupComponent.qml
- qml/photoqml/PhotoTab.qml
- qml/configqml/InfoBox.qml
- qml/configqml/ConfigPage.qml
- js/layout.js
- js/photoworker.js
- js/service.js
- js/news.js
- js/newsworker.js
- js/helper.js
- images/defaultcontact.jpg
- images/fontawesome-webfont.ttf
- images/folder-blue.png
- qml/configqml/OSSettingsAndroid.qml
- qml/configqml/OSSettingsLinux.qml
- qml/newsqml/SmileyDialog.qml
- js/smiley.js
- images/smileys/animals/bee.gif
- images/smileys/animals/bigspider.gif
- images/smileys/animals/bunny.gif
- images/smileys/animals/bunnyflowers.gif
- images/smileys/animals/cat.gif
- images/smileys/animals/chick.gif
- images/smileys/animals/cow.gif
- images/smileys/animals/crab.gif
- images/smileys/animals/dog.gif
- images/smileys/animals/dolphin.gif
- images/smileys/animals/dragonfly.gif
- images/smileys/animals/elephant.gif
- images/smileys/animals/fish.gif
- images/smileys/animals/frog.gif
- images/smileys/animals/giraffe.gif
- images/smileys/animals/hamster.gif
- images/smileys/animals/horse.gif
- images/smileys/animals/ladybird.gif
- images/smileys/animals/monkey.gif
- images/smileys/animals/parrot.gif
- images/smileys/animals/pig.gif
- images/smileys/animals/sheep.gif
- images/smileys/animals/snail.gif
- images/smileys/animals/tux.gif
- images/smileys/babies/baby.gif
- images/smileys/babies/babycot.gif
- images/smileys/babies/pregnant.gif
- images/smileys/babies/stork.gif
- images/smileys/confused/confused.gif
- images/smileys/confused/dazed.gif
- images/smileys/confused/shrug.gif
- images/smileys/confused/stupid.gif
- images/smileys/cool/affro.gif
- images/smileys/cool/cool.gif
- images/smileys/devilangel/angel.gif
- images/smileys/devilangel/blondedevil.gif
- images/smileys/devilangel/catdevil.gif
- images/smileys/devilangel/cherub.gif
- images/smileys/devilangel/daseesaw.gif
- images/smileys/devilangel/devil.gif
- images/smileys/devilangel/graveside.gif
- images/smileys/devilangel/saint.gif
- images/smileys/devilangel/turnevil.gif
- images/smileys/disgust/fartblush.gif
- images/smileys/disgust/fartinbed.gif
- images/smileys/disgust/toilet.gif
- images/smileys/disgust/vomit.gif
- images/smileys/drink/tea.gif
- images/smileys/drool/drool.gif
- images/smileys/fantasy/alienmonster.gif
- images/smileys/fantasy/barbarian.gif
- images/smileys/fantasy/dinosaur.gif
- images/smileys/fantasy/dragon.gif
- images/smileys/fantasy/dragonwhelp.gif
- images/smileys/fantasy/ghost.gif
- images/smileys/fantasy/mummy.gif
- images/smileys/fight/2guns.gif
- images/smileys/fight/acid.gif
- images/smileys/fight/alienfight.gif
- images/smileys/fight/alpha.png
- images/smileys/fight/army.gif
- images/smileys/fight/arrowhead.gif
- images/smileys/fight/bfg.gif
- images/smileys/fight/bowman.gif
- images/smileys/fight/chainsaw.gif
- images/smileys/fight/crossbow.gif
- images/smileys/fight/crusader.gif
- images/smileys/fight/dead.gif
- images/smileys/fight/gangs.gif
- images/smileys/fight/hammersplat.gif
- images/smileys/fight/lasergun.gif
- images/smileys/fight/machinegun.gif
- images/smileys/fight/marine.gif
- images/smileys/fight/sabre.gif
- images/smileys/fight/samurai.gif
- images/smileys/fight/tank.gif
- images/smileys/fight/viking.gif
- images/smileys/food/apple.gif
- images/smileys/food/banana.gif
- images/smileys/food/birthdaycake.gif
- images/smileys/food/broccoli.gif
- images/smileys/food/cake.gif
- images/smileys/food/carrot.gif
- images/smileys/food/cooking.gif
- images/smileys/food/fryegg.gif
- images/smileys/food/popcorn.gif
- images/smileys/food/tomato.gif
- images/smileys/happy/cloud9.gif
- images/smileys/happy/tearsofjoy.gif
- images/smileys/laugh/hahaha.gif
- images/smileys/laugh/loltv.gif
- images/smileys/laugh/rofl.gif
- images/smileys/love/iloveyou.gif
- images/smileys/love/inlove.gif
- images/smileys/love/love.gif
- images/smileys/love/lovebear.gif
- images/smileys/love/lovebed.gif
- images/smileys/love/loveheart.gif
- images/smileys/music/dj.gif
- images/smileys/music/drums.gif
- images/smileys/music/elvis.gif
- images/smileys/music/guitar.gif
- images/smileys/music/trumpet.gif
- images/smileys/music/violin.gif
- images/smileys/oldcore/beard.png
- images/smileys/oldcore/headbang.gif
- images/smileys/oldcore/laughing.gif
- images/smileys/oldcore/shaka.gif
- images/smileys/oldcore/surprised.gif
- images/smileys/oldcore/whitebeard.png
- images/smileys/respect/bow.gif
- images/smileys/respect/bravo.gif
- images/smileys/respect/hailking.gif
- images/smileys/respect/number1.gif
- images/smileys/sad/crying.png
- images/smileys/sad/prisoner.gif
- images/smileys/sad/sigh.gif
- images/smileys/smoking/smoking.gif
- images/smileys/sport/archery.gif
- images/smileys/sport/basketball.gif
- images/smileys/sport/bowling.gif
- images/smileys/sport/cycling.gif
- images/smileys/sport/darts.gif
- images/smileys/sport/fencing.gif
- images/smileys/sport/football.gif
- images/smileys/sport/golf.gif
- images/smileys/sport/horseriding.gif
- images/smileys/sport/juggling.gif
- images/smileys/sport/skipping.gif
- images/smileys/sport/snooker.gif
- images/smileys/sport/surfing.gif
- images/smileys/sport/tennis.gif
- images/smileys/tired/countsheep.gif
- images/smileys/tired/hammock.gif
- images/smileys/tired/pillow.gif
- images/smileys/tired/yawn.gif
- images/smileys/core/beer_mug.gif
- images/smileys/core/coffee.gif
- images/smileys/core/dislike.gif
- images/smileys/core/friendica-16.png
- images/smileys/core/like.gif
- images/smileys/core/rm-16.png
- images/smileys/core/smiley-bangheaddesk.gif
- images/smileys/core/smiley-brokenheart.gif
- images/smileys/core/smiley-cool.gif
- images/smileys/core/smiley-cry.gif
- images/smileys/core/smiley-embarassed.gif
- images/smileys/core/smiley-facepalm.gif
- images/smileys/core/smiley-foot-in-mouth.gif
- images/smileys/core/smiley-heart.gif
- images/smileys/core/smiley-kiss.gif
- images/smileys/core/smiley-laughing.gif
- images/smileys/core/smiley-Oo.gif
- images/smileys/core/smiley-smile.gif
- images/smileys/core/smiley-surprised.gif
- images/smileys/core/smiley-thumbsup.gif
- images/smileys/core/smiley-tongue-out.gif
- images/smileys/core/smiley-undecided.gif
- images/smileys/core/smiley-wink.gif
- images/smileys/core/smiley-frown.gif
- images/smileys/adult/bong.gif
- images/smileys/adult/drunk.gif
- images/smileys/adult/finger.gif
- images/smileys/adult/sperm.gif
- images/smileys/adult/tits.gif
- common/filesystem.cpp
- common/filesystem.h
- common/friendiqa.cpp
- common/uploadableimage.cpp
- common/uploadableimage.h
- common/xhr.cpp
- common/xhr.h
- qml/calendarqml/CalendarTab.qml
- qml/calendarqml/CalendarDay.qml
- qml/calendarqml/EventList.qml
- translations/friendiqa-de.qm
- translations/friendiqa-de.ts
- translations/friendiqa-es.qm
- translations/friendiqa-es.ts
- qml/photoqml/ImageUploadDialog.qml
- qml/genericqml/PermissionDialog.qml
- images/addImage.png
- qml/genericqml/ImagePicker.qml
- qml/genericqml/ImagePickerLinux.qml
- js/image.js
- qml/contactqml/ProfileComponent.qml
- translations/friendiqa-it.ts
- qml/genericqml/Search.qml
- qml/newsqml/Hashtag.qml
- qml/genericqml/IntentReceiver.qml
- qml/newsqml/NewsImage.qml
- qml/newsqml/NewsVideo.qml
- qml/newsqml/ContactPage.qml
- qml/newsqml/NewsLink.qml
- qml/configqml/RegisterPage.qml
- qml/configqml/AccountPage.qml
- qml/newsqml/NewsStack.qml
- qml/configqml/SyncConfig.qml
- qml/configqml/SyncComponent.qml
- qml/genericqml/MButton.qml
- qml/genericqml/LinuxSync.qml
-
-
diff --git a/source-linux/common/alarmlinux.cpp b/source-linux/common/alarmlinux.cpp
deleted file mode 100644
index c9b0a57..0000000
--- a/source-linux/common/alarmlinux.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-//#include
-//#include
-#include "alarm.h"
-#include
-#include
-//#include "AndroidNative/systemdispatcher.h"
-
-ALARM *ALARM::instance()
-{
- static ALARM alarm;
- return &alarm;
-}
-
-ALARM::ALARM(QObject *parent) : QObject(parent){}
-
-void ALARM::setAlarm(int interval)
-{
- qDebug() << interval;
- QVariantMap message;
- message["value"] = interval;
- // AndroidNative::SystemDispatcher::instance()->loadClass("androidnative.Util");
- // AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.setSchedule", message);
- //AndroidNative::SystemDispatcher::instance()->dispatch("androidnative.Util.stopService", message);
-}
-
-void ALARM::notify(QString title, QString text, int id)
-{
- qDebug() << title << text;
- QVariantMap message;
- message["title"] = title;
- message["message"] = text;
- QDBusConnection bus = QDBusConnection::sessionBus();
- QDBusInterface dbus_iface("org.freedesktop.Notifications", "/org/freedesktop/Notifications",
- "org.freedesktop.Notifications", bus);
- QString appname="Friendiqa";
- uint v=12321;
- if (dbus_iface.isValid()){
-
- dbus_iface.call("Notify",appname,v,"",title,text,"","",5000);
- }
- // AndroidNative::SystemDispatcher::instance()->dispatch("Notifier.notify", message);
-}
diff --git a/source-linux/common/friendiqa.cpp b/source-linux/common/friendiqa.cpp
deleted file mode 100644
index 3eccb3c..0000000
--- a/source-linux/common/friendiqa.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include
-#include
-//#include
-//#include
-#include
-#include "xhr.h"
-#include "updatenews.h"
-#include "filesystem.h"
-#include "remoteauthasyncimageprovider.h"
-//#include "alarm.h"
-//#include "AndroidNative/systemdispatcher.h"
-//#include "AndroidNative/environment.h"
-//#include "AndroidNative/debug.h"
-//#include "AndroidNative/mediascannerconnection.h"
-
-
-#ifdef Q_OS_ANDROID
-#include
-#include
-JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
- Q_UNUSED(vm);
- qDebug("NativeInterface::JNI_OnLoad()"); // It must call this function within JNI_OnLoad to enable System Dispatcher
-
- AndroidNative::SystemDispatcher::registerNatives();
- return JNI_VERSION_1_6;
- }
-#endif
-
-
-int main(int argc, char *argv[]) {
- //qDebug()<< "argv Friendiqa"<< argv[0] <<" argv2" <setDatabase();
- updatenews->login();
- updatenews->startsync();
- //app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
- //QtAndroid::androidService().callMethod("stopSelf");
- //return app.exec();
- }
- else{
- QApplication app(argc, argv);
- QQuickView view;
- QTranslator qtTranslator;
- qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
- app.installTranslator(&qtTranslator);
- RemoteAuthAsyncImageProvider *imageProvider = new RemoteAuthAsyncImageProvider;
- view.engine()->addImageProvider("remoteauthimage",imageProvider);
- view.rootContext()->setContextProperty("remoteauth", imageProvider);
- XHR* xhr = XHR::instance();
- view.rootContext()->setContextProperty("xhr", xhr);
- FILESYSTEM* filesystem = FILESYSTEM::instance();
- view.rootContext()->setContextProperty("filesystem", filesystem);
- ALARM* alarm = ALARM::instance();
- view.rootContext()->setContextProperty("alarm", alarm);
- UPDATENEWS* updatenews = UPDATENEWS::instance();
- view.rootContext()->setContextProperty("updatenews", updatenews);
- view.setSource(QUrl("qrc:/qml/friendiqa.qml"));
- view.show();
- view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit()));
- return app.exec();
- }
-}
-
diff --git a/source-linux/common/remoteauthasyncimageprovider.cpp b/source-linux/common/remoteauthasyncimageprovider.cpp
deleted file mode 100644
index 66a8b03..0000000
--- a/source-linux/common/remoteauthasyncimageprovider.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "remoteauthasyncimageprovider.h"
-#include
-#include
-
- AsyncImageResponse::AsyncImageResponse(QNetworkRequest req, QSize reqSize)
- {
- m_reply = m_imageLoader.get(req);
- m_requestedSize = reqSize;
- connect(m_reply, &QNetworkReply::finished, this, &AsyncImageResponse::onResponseFinished);
-}
-
-
- void AsyncImageResponse::onResponseFinished()
- {
- QByteArray myImageData = m_reply->readAll();
- m_resultImage = QImage::fromData(myImageData);
- if (m_requestedSize.isValid())
- {
- m_resultImage = m_resultImage.scaled(m_requestedSize);
- }
- emit finished();
- }
-
-
- QQuickTextureFactory *AsyncImageResponse::textureFactory() const
- {
- return QQuickTextureFactory::textureFactoryForImage(m_resultImage);
- }
-
-
- RemoteAuthAsyncImageProvider::RemoteAuthAsyncImageProvider()
- {
- }
-
-
- QQuickImageResponse* RemoteAuthAsyncImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
- {
- QUrl iUrl=url()+"/api/friendica/remoteauth?c_url="+contacturl()+"&url="+id;
- QByteArray loginData = m_login.toLocal8Bit().toBase64();
- QString headerData = "Basic " + loginData;
-
- QNetworkRequest request(iUrl);
- request.setRawHeader("Authorization", headerData.toLocal8Bit());
- request.setAttribute(QNetworkRequest::FollowRedirectsAttribute,true);
- request.setUrl(iUrl);
- return new AsyncImageResponse(request, requestedSize);
- }
-
-
- void RemoteAuthAsyncImageProvider::setContacturl(QString contacturl)
- {
- if (contacturl!=m_contacturl) {
- m_contacturl = contacturl;
- emit contacturlChanged();
- }
- }
-
-
- void RemoteAuthAsyncImageProvider::setUrl(QString url)
- {
- if (url!=m_url) {
- m_url = url;
- emit urlChanged();
- }
- }
-
-
- void RemoteAuthAsyncImageProvider::setLogin(QString login)
- {
- if (login!=m_login) {
- m_login = login;
- emit loginChanged();
- }
- }
-
-
- QString RemoteAuthAsyncImageProvider::contacturl() const
- {
- return m_contacturl;
- }
-
-
- QString RemoteAuthAsyncImageProvider::url() const
- {
- return m_url;
- }
-
-
- QString RemoteAuthAsyncImageProvider::login() const
- {
- return m_login;
- }
diff --git a/source-linux/common/updatenews.cpp b/source-linux/common/updatenews.cpp
deleted file mode 100644
index b86a172..0000000
--- a/source-linux/common/updatenews.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "updatenews.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-//#include "AndroidNative/systemdispatcher.h"
-
-
-
-UPDATENEWS *UPDATENEWS::instance()
-{
- static UPDATENEWS udn;
- return &udn;
-}
-
-UPDATENEWS::UPDATENEWS(QObject *parent) : QObject(parent)
-{
-
-}
-
-void UPDATENEWS::setUrl(QString url)
-{
- if (url!=m_url) {
- m_url = url;
- xhr.setUrl(url);
- emit urlChanged(m_url);
- }
-}
-
-
-void UPDATENEWS::setDatabase()
-{
- static QQmlEngine qe;
- QString db_url=qe.offlineStorageDatabaseFilePath("Friendiqa");
- m_db = QSqlDatabase::addDatabase("QSQLITE");
- m_db.setDatabaseName(QUrl("file://"+db_url+".sqlite").toLocalFile());
- //qDebug() << db_url;
-
- if (!m_db.open())
- {
- qDebug() << "Error: connection with database fail " << m_db.lastError();
- }
-}
-
-
-void UPDATENEWS::login()
-{
- QSqlQuery query("SELECT * FROM config WHERE isActive=0",m_db);
- while (query.next())
- {
- username = query.value(1).toString();
- QByteArray bpassword=query.value(2).toByteArray();
- QString password=QByteArray::fromBase64(bpassword);
- m_login=username+":"+password ;
- xhr.setLogin(m_login);
- m_url=query.value(0).toString();
- xhr.setUrl(m_url);
- m_imagedir=query.value(3).toString();
- xhr.setImagedir(m_imagedir);
- QString isActive=query.value(7).toString();
- }
- //m_updateInterval=query.value(5).toInt();
-
-
- QSqlQuery syncquery("SELECT * FROM globaloptions",m_db);
-// QSqlQuery delquery("DELETE FROM globaloptions WHERE k='sync_interval'",m_db);
-// delquery.exec();
- m_updateInterval=0;
- syncindex=0;
- synclist.clear();
- //QSqlQuery syncquery("SELECT * FROM globaloptions WHERE k like 'sync_%' AND v=1",m_db);
- while (syncquery.next()){
- if (syncquery.value(0).toString()=="syncinterval"){
- m_updateInterval=syncquery.value(1).toInt();
- }
- if (syncquery.value(0).toString().left(5)=="sync_" && syncquery.value(1).toInt()==1){
- synclist.append(syncquery.value(0).toString());
- //qDebug() << " sync " << syncquery.value(0).toString() << " " < newcontacts=findNewContacts(news);
- //qDebug()<< "new contacts count " << newcontacts.size();
- if (newcontacts.size()>0){
- updateContacts(newcontacts);
- startImagedownload();
-
- } else {
- if(m_updateInterval!=0){
- syncindex+=1;
- startsync();
- }
- }
- }
- else {
- qDebug()<< "Friendiqa updatenews error " << serverreply;
- emit this->error(m_api,QTextCodec::codecForName("utf-8")->toUnicode(serverreply));
- syncindex+=1;
- startsync();
- }
- }
-
-}
-
-
-
-void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index){
- if (downloadtype=="contactlist"){
- QSqlQuery testquery("SELECT profile_image FROM contacts WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db);
- testquery.first();
- //qDebug()<< "update imageurl for " < UPDATENEWS::findNewContacts(QJsonDocument news){
- QSqlQuery query("SELECT profile_image_url FROM contacts",m_db);
- QList imageurls;
- while (query.next()){
- imageurls.append(query.value(0).toString());
- }
- QList newcontacts;
- //qDebug()<<"updatenews findcontacts news count "< contacts){
- qint64 currentTime =QDateTime::currentMSecsSinceEpoch();
- for (int i=0; i < contacts.count();i++){
- QJsonValue contact=contacts[i];
- QSqlQuery query(m_db);
- //qDebug() << "updatecontact " << contact["screen_name"];
- QSqlQuery testquery("SELECT url FROM contacts WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'",m_db);
- if (testquery.first()){
- query.prepare("UPDATE contacts SET id=?, name=?, screen_name=?, location=?,imageAge=?,"
- "profile_image_url=?, description=?, protected=?, followers_count=?,"
- "friends_count=?, created_at=?, favourites_count=?, utc_offset=?, time_zone=?, statuses_count=?,"
- "following=?, verified=?, statusnet_blocking=?, notifications=?, statusnet_profile_url=?, cid=?, network=?, timestamp=? "
- " WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'");
- query.bindValue(0, contact["id"].toInt());
- query.bindValue(1, contact["name"].toString().toUtf8().toBase64());
- query.bindValue(2, contact["screen_name"]);
- query.bindValue(3, contact["location"]);
- query.bindValue(4, currentTime);
- query.bindValue(5, contact["profile_image_url"].toString().section('?',0,0));
- if(contact["description"].isNull() ){query.bindValue(6,"");}else{query.bindValue(6, contact["description"].toString().toUtf8().toBase64());}
- query.bindValue(7,contact["protected"].toBool());
- query.bindValue(8,contact["followers_count"].toInt());
- query.bindValue(9,contact["friends_count"].toInt());
- QString sourcedate=contact["created_at"].toString();
- QString formateddate=sourcedate.mid(0,3)+", "+sourcedate.mid(8,3)+sourcedate.mid(4,3)+sourcedate.mid(25,5)+sourcedate.mid(10,15);
- query.bindValue(10,QDateTime::fromString(formateddate,Qt::RFC2822Date).toMSecsSinceEpoch() );
- query.bindValue(11,contact["favorites_count"].toInt());
- query.bindValue(12,contact["utc_offset"].toInt());
- query.bindValue(13,contact["time_zone"].toString());
- query.bindValue(14,contact["statuses_count"].toInt());
- query.bindValue(15,contact["following"].toBool());
- query.bindValue(16,contact["verfied"].toBool());
- query.bindValue(17,contact["statusnet_blocking"].toBool());
- query.bindValue(18,contact["notifications"].toBool());
- query.bindValue(19,contact["statusnet_profile_url"]);
- query.bindValue(20,contact["cid"].toInt());
- query.bindValue(21,contact["network"]);
- qint64 timestamp=0;
- QString timestamphelper=contact["profile_image_url"].toString();
- try {timestamp=timestamphelper.mid(timestamphelper.indexOf("?ts")+4,timestamphelper.length()).toUInt();} catch(...){}
- query.bindValue(22,timestamp);
- }
-
- else{
- query.prepare("INSERT INTO contacts (username, id, name, screen_name, location,imageAge,"
- "profile_image_url, description, profile_image, url, protected, followers_count,"
- "friends_count, created_at, favourites_count, utc_offset, time_zone, statuses_count,"
- "following, verified, statusnet_blocking, notifications, statusnet_profile_url, cid, network, isFriend, timestamp)"
- "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-
- query.bindValue(0,username);
- query.bindValue(1, contact["id"].toInt());
- query.bindValue(2, contact["name"].toString().toUtf8().toBase64());
- query.bindValue(3, contact["screen_name"]);
- query.bindValue(4, contact["location"]);
- query.bindValue(5, currentTime);
- query.bindValue(6, contact["profile_image_url"].toString().section('?',0,0));
- if(contact["description"].isNull() ){query.bindValue(7,"");}else{query.bindValue(7, contact["description"].toString().toUtf8().toBase64());}
- query.bindValue(8,"none");
- query.bindValue(9, contact["url"].toString());
- query.bindValue(10,contact["protected"].toBool());
- query.bindValue(11,contact["followers_count"].toInt());
- query.bindValue(12,contact["friends_count"].toInt());
- QString sourcedate=contact["created_at"].toString();
- QString formateddate=sourcedate.mid(0,3)+", "+sourcedate.mid(8,3)+sourcedate.mid(4,3)+sourcedate.mid(25,5)+sourcedate.mid(10,15);
- query.bindValue(13,QDateTime::fromString(formateddate,Qt::RFC2822Date).toMSecsSinceEpoch() );
- query.bindValue(14,contact["favorites_count"].toInt());
- query.bindValue(15,contact["utc_offset"].toInt());
- query.bindValue(16,contact["time_zone"].toString());
- query.bindValue(17,contact["statuses_count"].toInt());
- query.bindValue(18,contact["following"].toBool());
- query.bindValue(19,contact["verfied"].toBool());
- query.bindValue(20,contact["statusnet_blocking"].toBool());
- query.bindValue(21,contact["notifications"].toBool());
- query.bindValue(22,contact["statusnet_profile_url"]);
- query.bindValue(23,contact["cid"].toInt());
- query.bindValue(24,contact["network"]);
- query.bindValue(25, 0);
- qint64 timestamp=0;
- QString timestamphelper=contact["profile_image_url"].toString();
- try {timestamp=timestamphelper.mid(timestamphelper.indexOf("?ts")+4,timestamphelper.length()).toUInt();} catch(...){}
- query.bindValue(26,timestamp);
-
- }
- query.exec() ;
- }
-}
-
-QString UPDATENEWS::url() const
-{
- return m_url;
-}
-
-void UPDATENEWS::startImagedownload()
-{
- //qDebug() << "start image download";
- xhr.setDownloadtype("contactlist");
- xhr.setFilelist(newcontactimagelinks);
- xhr.setContactlist(newcontactnames);
- xhr.setImagedir(m_imagedir);
- xhr.getlist();
-}
-
-void UPDATENEWS::showError(QString data, QString url,QString api, int code )
-{
- qDebug() << "showerror " << api << " data " << data;
- emit this->error(api,data);
- if (api!=m_api || xhr.downloadtype()!=""){} else{
- if(m_updateInterval!=0){
- syncindex+=1;
- startsync();
- }
- }
-}
diff --git a/source-linux/common/uploadableimage.cpp b/source-linux/common/uploadableimage.cpp
deleted file mode 100644
index 7ef3524..0000000
--- a/source-linux/common/uploadableimage.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "uploadableimage.h"
-
-
-#include
-#include
-#include
-#include
-
-void UploadableImage::setSource(const QString &a) {
- if (a != m_source) {
- m_source = a;
- //m_base64 = "";
- m_mimetype = "";
- m_filename = "";
-
- qDebug() << "UploadableImage::setSource : " << m_source;
-
- if (m_source=="") {
- emit sourceChanged();
- //emit base64Changed();
- emit mimetypeChanged();
- emit filenameChanged();
- return;
- }
-
- QImage fullimage = QImage(QUrl(m_source).toLocalFile());
- if (fullimage.width() > 800 || fullimage.height() > 800) {
- if (fullimage.width() > fullimage.height()) {
- m_image = fullimage.scaledToWidth(800);
- } else {
- m_image = fullimage.scaledToHeight(800);
- }
- } else {
- m_image = fullimage;
- }
- qDebug() << "UploadableImage::setSource : " << m_image.width() << "x" << m_image.height();
- emit sourceChanged();
-
- QFileInfo fi(m_source);
-
- m_filename = fi.fileName();
- emit filenameChanged();
-
- QString filetype = fi.suffix().toUpper();
- if (filetype!="PNG" && filetype!="JPG") {
- filetype = "JPG";
- }
- qDebug() << "UploadableImage::setSource : " << "Saving as " << filetype;
-
- m_mimetype = "image/"+filetype.toLower();
- emit mimetypeChanged();
-
- /*
- QByteArray byteArray;
- QBuffer buffer(&byteArray);
- m_image.save(&buffer, filetype.toLatin1().constData());
- QString b64 = QString::fromLatin1(byteArray.toBase64().data());
-
- for(int k=0; k
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "xhr.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "uploadableimage.h"
-
-XHR *XHR::instance()
-{
- static XHR xhr;
- return &xhr;
-}
-
-XHR::XHR(QObject *parent) : QObject(parent)
-{
- request.setSslConfiguration(QSslConfiguration::defaultConfiguration());
-}
-
-void XHR::setUrl(QString url)
-{
- if (url!=m_url) {
- m_url = url;
- emit urlChanged();
- }
-}
-
-void XHR::setApi(QString api)
-{
- if (api!=m_api) {
- m_api = api;
- emit apiChanged();
- }
-}
-
-void XHR::setLogin(QString login)
-{
- if (login!=m_login) {
- m_login = login;
- emit loginChanged();
- }
-}
-
-void XHR::setFilename(QString filename)
-{
- if (filename!=m_filename) {
- m_filename = filename;
- emit filenameChanged();
- }
-}
-
-void XHR::setContactlist(QList contactlist)
-{
- if (contactlist!=m_contactlist) {
- m_contactlist = contactlist;
- emit contactlistChanged();
- }
-}
-
-void XHR::setFilelist(QList filelist)
-{
- if (filelist!=m_filelist) {
- m_filelist = filelist;
- emit filelistChanged();
- }
-}
-
-void XHR::setImagedir(QString imagedir)
-{
- if (imagedir!=m_imagedir) {
- m_imagedir = imagedir;
- emit imagedirChanged();
- }
-}
-void XHR::setDownloadtype(QString downloadtype)
-{
- if (downloadtype!=m_downloadtype) {
- m_downloadtype = downloadtype;
- emit downloadtypeChanged();
- }
-}
-
-QString XHR::url() const
-{
- return m_url;
-}
-
-QString XHR::api() const
-{
- return m_api;
-}
-
-QString XHR::login() const
-{
- return m_login;
-}
-
-QString XHR::filename() const
-{
- return m_filename;
-}
-
-QList XHR::contactlist() const
-{
- return m_contactlist;
-}
-
-QList XHR::filelist() const
-{
- return m_filelist;
-}
-
-QString XHR::imagedir() const
-{
- return m_imagedir;
-}
-
-QString XHR::downloadtype() const
-{
- return m_downloadtype;
-}
-
-QString XHR::networktype()
-{
- return nc.bearerTypeFamily() + nc.bearerTypeName();
-}
-
-void XHR::setParam(QString name, QString value)
-{
- params.insert(name, value);
-}
-
-void XHR::setImageFileParam(QString name, QString url)
-{
- files.insert(name, url);
-}
-
-void XHR::clearParams()
-{
- files.clear();
- params.clear();
-}
-
-void XHR::download()
-{
- QUrl requrl(m_url);
- if(m_downloadtype=="picturelist"){
- QByteArray loginData = m_login.toLocal8Bit().toBase64();
- QString headerData = "Basic " + loginData;
- request.setRawHeader("Authorization", headerData.toLocal8Bit());
- }
- request.setUrl(requrl);
- reply = manager.get(request);
- reply->ignoreSslErrors();
- connect(reply, &QNetworkReply::readyRead,this, &XHR::onReadyRead);
- //connect(reply,SIGNAL(downloadProgress(qint64,qint64)), this,SLOT(updateDownloadProgress(qint64,qint64)));
- connect(reply, &QNetworkReply::finished,this, &XHR::onRequestFinished);
- connect(reply, &QNetworkReply::sslErrors, this, &XHR::onSSLError);
- connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onReplyError(QNetworkReply::NetworkError)));
-}
-
-void XHR::get()
-{
- QUrlQuery query;
-
- QHashIterator i(params);
- while(i.hasNext()) {
- i.next();
- query.addQueryItem(i.key(), i.value());
- //qDebug()< iparams(params);
- while(iparams.hasNext()) {
- iparams.next();
- //qDebug() << "\t add param " << iparams.key() << " : " << iparams.value();
- QHttpPart textPart;
- textPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"" + iparams.key() + "\""));
-
-
- textPart.setBody(iparams.value().toUtf8());
- multiPart->append(textPart);
- }
-
- UploadableImage uimg;
- QHashIterator ifiles(files);
- while(ifiles.hasNext()) {
- ifiles.next();
-
- uimg.setSource(ifiles.value());
- //qDebug() << "\t image: " << uimg.mimetype() << ", " << ifiles.key();
-
- QHttpPart imagePart;
- imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant(uimg.mimetype()));
- imagePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"" + ifiles.key() + "\"; filename=\""+uimg.filename()+"\""));
- imagePart.setBody(uimg.bytes());
- multiPart->append(imagePart);
- }
-
- QByteArray loginData = m_login.toLocal8Bit().toBase64();
- QString headerData = "Basic " + loginData;
- request.setRawHeader(QByteArray("Authorization"), headerData.toLocal8Bit());
-
- request.setUrl(m_url+m_api);
- reply = manager.post(request, multiPart);
- qDebug() << "\t request sent";
- connect(reply, &QNetworkReply::finished, this, &XHR::onReplySuccess);
- connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onReplyError(QNetworkReply::NetworkError)));
- connect(reply, &QNetworkReply::readyRead, this, &XHR::onReadyRead);
- connect(reply, &QNetworkReply::sslErrors, this, &XHR::onSSLError);
- qDebug() << "\t reply signals connected";
-}
-
-void XHR::onReplyError(QNetworkReply::NetworkError code)
-{
- qDebug() << code;
- emit this->error( bufferToString(), m_url,m_api, (int) code);
- buffer.clear();
- reply->deleteLater();
-}
-
-void XHR::onReplySuccess()
-{
- qDebug() << "!";
- emit this->success(buffer, m_api);
- buffer.clear();
-// reply->deleteLater();
-}
-
-void XHR::onRequestFinished()
-{
- qDebug()<<"download requestFinished ";
- // Save the file here
- if (buffer.isNull()){qDebug() << "File empty"<error(m_downloadtype,m_url,m_api,1);}
- else if (m_downloadtype=="picturelist") {
- QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer);
- QJsonObject jsonObject = jsonResponse.object();
- int arraystart=buffer.indexOf('{"data":"')+8;
- int arraylength=buffer.indexOf('"',9)-arraystart;
- QByteArray b64=buffer.mid(arraystart,arraylength);
- QString helpfilename=jsonObject["filename"].toString();
- QString helpfile=helpfilename.left(helpfilename.lastIndexOf("."));
- QString filesuffix="";
- if (jsonObject["type"].toString()=="image/jpeg"){filesuffix=".jpg";}
- else if (jsonObject["type"].toString()=="image/png"){filesuffix=".png";}
- else {filesuffix="";}
- if (helpfilename==""){// check if file has any filename
- helpfile=jsonObject["id"].toString();
- setFilename(imagedir()+"albums/"+jsonObject["album"].toString()+"/"+jsonObject["id"].toString()+filesuffix);
- }
- else{setFilename(imagedir()+"albums/"+jsonObject["album"].toString()+"/"+helpfile+filesuffix);}
- //qDebug()<<"Filename "<downloadedjson(m_downloadtype,m_url,m_filename,dlindex,jsonObject);
- if(downloadtype()=="picturelist"){dlindex=dlindex+1;XHR::getlist();}
- }
- else {
- QFile file(m_filename);
- file.open(QIODevice::WriteOnly);
- file.write(buffer);
- buffer.clear();
- file.close();
- emit this->downloaded(m_downloadtype,m_url,m_filename,dlindex);
- if(downloadtype()=="contactlist"){dlindex=dlindex+1;XHR::getlist();}
-
- //reply->deleteLater();
- }
-}
-
-void XHR::onReadyRead()
-{
- qDebug() << ".";
- buffer += reply->readAll();
-}
-
-//void XHR::updateDownloadProgress(qint64 bytesRead, qint64 totalBytes)
-//{
-// qDebug() << "Bytes: " << bytesRead<<" / "< &errors)
-{
- qDebug() << "XHR::onSSLError :" ;
- QListIterator ierrs(errors);
- while(ierrs.hasNext()) {
- qDebug() << "\t" << ierrs.next().errorString();
- }
-}
-
-QString XHR::bufferToString()
-{
- return QTextCodec::codecForName("utf-8")->toUnicode(buffer);
-}
diff --git a/source-linux/common/xhr.h b/source-linux/common/xhr.h
deleted file mode 100644
index 9141a84..0000000
--- a/source-linux/common/xhr.h
+++ /dev/null
@@ -1,134 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef XHR_H
-#define XHR_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-class XHR : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
- Q_PROPERTY(QString login READ login WRITE setLogin NOTIFY loginChanged)
- Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
- Q_PROPERTY(QString imagedir READ imagedir WRITE setImagedir NOTIFY imagedirChanged)
- Q_PROPERTY(QList contactlist READ contactlist WRITE setContactlist NOTIFY contactlistChanged)
- Q_PROPERTY(QList filelist READ filelist WRITE setFilelist NOTIFY filelistChanged)
- Q_PROPERTY(QString downloadtype READ downloadtype WRITE setDownloadtype NOTIFY downloadtypeChanged)
- Q_PROPERTY(QString networktype READ networktype() NOTIFY networktypeChanged)
-
-
-public:
- static XHR *instance();
-
- explicit XHR(QObject *parent = 0);
-
- QString url() const;
- QString api() const;
- QString login() const;
- QString filename() const;
- QList contactlist() const;
- QList filelist() const;
- QString imagedir() const;
- QString downloadtype() const;
- QString networktype();
-
-signals:
- void urlChanged();
- void apiChanged();
- void loginChanged();
- void filenameChanged();
- void contactlistChanged();
- void filelistChanged();
- void imagedirChanged();
- void downloadtypeChanged();
- void networktypeChanged();
- void downloaded(QString type, QString url, QString filename, int i);
- void downloadedjson(QString type, QString url, QString filename, int i,QJsonObject jsonObject);
- void success(QByteArray data, QString api);
- void error(QString data, QString url,QString api, int code);
-
-public slots:
- void setUrl(QString url);
- void setApi(QString api);
- void setLogin(QString login);
- void setDownloadtype(QString downloadtype);
- void setFilename(QString filename);
- void setContactlist(QList filename);
- void setFilelist(QList filename);
- void setImagedir(QString filename);
- void setParam(QString name, QString value);
- void setImageFileParam(QString name, QString url);
- void clearParams();
- void post();
- void get();
- void getlist();
- void download();
-
-// void networktype();
-
-private slots:
- void onReplyError(QNetworkReply::NetworkError code);
- void onReplySuccess();
- void onRequestFinished();
- void onReadyRead();
- void onSSLError(const QList &errors);
- //void updateDownloadProgress(qint64 bytesRead, qint64 totalBytes);
-
-private:
- QByteArray buffer;
- QString m_url;
- QString m_api;
- QString m_login;
- QString m_filename;
- QString m_downloadtype;
- QString m_networktype;
- QHash params;
- QHash files;
- QList m_filelist;
- QList m_contactlist;
- QString m_imagedir;
- int dlindex;
-
- QNetworkAccessManager manager;
- QNetworkRequest request;
- QNetworkReply *reply;
- QNetworkConfiguration nc;
- QString bufferToString();
-};
-
-#endif // XHR_H
diff --git a/source-linux/friendiqa.pro b/source-linux/friendiqa.pro
deleted file mode 100644
index e4f9de6..0000000
--- a/source-linux/friendiqa.pro
+++ /dev/null
@@ -1,59 +0,0 @@
-# NOTICE:
-#
-# Application name defined in TARGET has a corresponding QML filename.
-# If name defined in TARGET is changed, the following needs to be done
-# to match new name:
-# - corresponding QML filename must be changed
-# - desktop icon filename must be changed
-# - desktop filename must be changed
-# - icon definition filename in desktop file must be changed
-# - translation filenames have to be changed
-
-# The name of your application
-TEMPLATE = app
-TARGET = friendiqa
-CONFIG += release
-QT += qml quick gui widgets sql webview dbus
-
-SOURCES += common/friendiqa.cpp \
- common/uploadableimage.cpp \
- common/xhr.cpp \
- common/filesystem.cpp \
- common/remoteauthasyncimageprovider.cpp \
- common/updatenews.cpp \
- common/alarmlinux.cpp
-
-RESOURCES = application.qrc
-
-OTHER_FILES += qml/friendiqa.qml \
- translations/*.ts \
- qml/*.qml
- qml/newsqml/*.qml
- qml/contactqml/*.qml
- qml/photoqml/*.qml
- qml/configqml/*.qml
- js/*.js
-
-TRANSLATIONS += translations/friendiqa-de.ts \
- translations/friendiqa-es.ts \
- translations/friendiqa-it.ts
-HEADERS += \
- common/uploadableimage.h \
- common/xhr.h \
- common/filesystem.h \
- common/remoteauthasyncimageprovider.h \
- common/updatenews.h \
- common/alarm.h
-
-DISTFILES += \
- qml/calendarqml/*.qml \
- translations/*.ts \
- translations/*.qm \
- qml/*.qml \
- qml/newsqml/*.qml \
- qml/contactqml/*.qml \
- qml/photoqml/*.qml \
- qml/configqml/*.qml \
- js/*.js \
- qml/newsqml/NewsStack.qml \
- qml/configqml/SyncComponent.qml
diff --git a/source-linux/images/addImage.png b/source-linux/images/addImage.png
deleted file mode 100644
index 988f9f1..0000000
Binary files a/source-linux/images/addImage.png and /dev/null differ
diff --git a/source-linux/images/defaultcontact.jpg b/source-linux/images/defaultcontact.jpg
deleted file mode 100644
index bb7bce2..0000000
Binary files a/source-linux/images/defaultcontact.jpg and /dev/null differ
diff --git a/source-linux/images/folder-blue.png b/source-linux/images/folder-blue.png
deleted file mode 100644
index b530009..0000000
Binary files a/source-linux/images/folder-blue.png and /dev/null differ
diff --git a/source-linux/images/fontawesome-webfont.ttf b/source-linux/images/fontawesome-webfont.ttf
deleted file mode 100644
index 35acda2..0000000
Binary files a/source-linux/images/fontawesome-webfont.ttf and /dev/null differ
diff --git a/source-linux/images/smileys/adult/bong.gif b/source-linux/images/smileys/adult/bong.gif
deleted file mode 100644
index 4b67122..0000000
Binary files a/source-linux/images/smileys/adult/bong.gif and /dev/null differ
diff --git a/source-linux/images/smileys/adult/drunk.gif b/source-linux/images/smileys/adult/drunk.gif
deleted file mode 100644
index 4a1c064..0000000
Binary files a/source-linux/images/smileys/adult/drunk.gif and /dev/null differ
diff --git a/source-linux/images/smileys/adult/finger.gif b/source-linux/images/smileys/adult/finger.gif
deleted file mode 100644
index d45dcb8..0000000
Binary files a/source-linux/images/smileys/adult/finger.gif and /dev/null differ
diff --git a/source-linux/images/smileys/adult/sperm.gif b/source-linux/images/smileys/adult/sperm.gif
deleted file mode 100644
index 6ba9219..0000000
Binary files a/source-linux/images/smileys/adult/sperm.gif and /dev/null differ
diff --git a/source-linux/images/smileys/adult/tits.gif b/source-linux/images/smileys/adult/tits.gif
deleted file mode 100644
index 4c1658c..0000000
Binary files a/source-linux/images/smileys/adult/tits.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/bee.gif b/source-linux/images/smileys/animals/bee.gif
deleted file mode 100644
index 206c2e3..0000000
Binary files a/source-linux/images/smileys/animals/bee.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/bigspider.gif b/source-linux/images/smileys/animals/bigspider.gif
deleted file mode 100644
index bc43deb..0000000
Binary files a/source-linux/images/smileys/animals/bigspider.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/bunny.gif b/source-linux/images/smileys/animals/bunny.gif
deleted file mode 100644
index 402b2b3..0000000
Binary files a/source-linux/images/smileys/animals/bunny.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/bunnyflowers.gif b/source-linux/images/smileys/animals/bunnyflowers.gif
deleted file mode 100644
index 6d665e2..0000000
Binary files a/source-linux/images/smileys/animals/bunnyflowers.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/cat.gif b/source-linux/images/smileys/animals/cat.gif
deleted file mode 100644
index a612c47..0000000
Binary files a/source-linux/images/smileys/animals/cat.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/chick.gif b/source-linux/images/smileys/animals/chick.gif
deleted file mode 100644
index 6bcddcd..0000000
Binary files a/source-linux/images/smileys/animals/chick.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/cow.gif b/source-linux/images/smileys/animals/cow.gif
deleted file mode 100644
index 3f94cfa..0000000
Binary files a/source-linux/images/smileys/animals/cow.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/crab.gif b/source-linux/images/smileys/animals/crab.gif
deleted file mode 100644
index db5b8ce..0000000
Binary files a/source-linux/images/smileys/animals/crab.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/dog.gif b/source-linux/images/smileys/animals/dog.gif
deleted file mode 100644
index 7b28477..0000000
Binary files a/source-linux/images/smileys/animals/dog.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/dolphin.gif b/source-linux/images/smileys/animals/dolphin.gif
deleted file mode 100644
index 672ebd7..0000000
Binary files a/source-linux/images/smileys/animals/dolphin.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/dragonfly.gif b/source-linux/images/smileys/animals/dragonfly.gif
deleted file mode 100644
index 566e95c..0000000
Binary files a/source-linux/images/smileys/animals/dragonfly.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/elephant.gif b/source-linux/images/smileys/animals/elephant.gif
deleted file mode 100644
index 4311e97..0000000
Binary files a/source-linux/images/smileys/animals/elephant.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/fish.gif b/source-linux/images/smileys/animals/fish.gif
deleted file mode 100644
index 3a7a584..0000000
Binary files a/source-linux/images/smileys/animals/fish.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/frog.gif b/source-linux/images/smileys/animals/frog.gif
deleted file mode 100644
index 85e4b56..0000000
Binary files a/source-linux/images/smileys/animals/frog.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/giraffe.gif b/source-linux/images/smileys/animals/giraffe.gif
deleted file mode 100644
index 4c95ea4..0000000
Binary files a/source-linux/images/smileys/animals/giraffe.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/hamster.gif b/source-linux/images/smileys/animals/hamster.gif
deleted file mode 100644
index 96c7323..0000000
Binary files a/source-linux/images/smileys/animals/hamster.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/horse.gif b/source-linux/images/smileys/animals/horse.gif
deleted file mode 100644
index 9103abf..0000000
Binary files a/source-linux/images/smileys/animals/horse.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/ladybird.gif b/source-linux/images/smileys/animals/ladybird.gif
deleted file mode 100644
index 69444a9..0000000
Binary files a/source-linux/images/smileys/animals/ladybird.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/monkey.gif b/source-linux/images/smileys/animals/monkey.gif
deleted file mode 100644
index b9b338d..0000000
Binary files a/source-linux/images/smileys/animals/monkey.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/parrot.gif b/source-linux/images/smileys/animals/parrot.gif
deleted file mode 100644
index ae6faf6..0000000
Binary files a/source-linux/images/smileys/animals/parrot.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/pig.gif b/source-linux/images/smileys/animals/pig.gif
deleted file mode 100644
index bdc68e8..0000000
Binary files a/source-linux/images/smileys/animals/pig.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/sheep.gif b/source-linux/images/smileys/animals/sheep.gif
deleted file mode 100644
index 8fafc11..0000000
Binary files a/source-linux/images/smileys/animals/sheep.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/snail.gif b/source-linux/images/smileys/animals/snail.gif
deleted file mode 100644
index 3bdb44c..0000000
Binary files a/source-linux/images/smileys/animals/snail.gif and /dev/null differ
diff --git a/source-linux/images/smileys/animals/tux.gif b/source-linux/images/smileys/animals/tux.gif
deleted file mode 100644
index 08e006e..0000000
Binary files a/source-linux/images/smileys/animals/tux.gif and /dev/null differ
diff --git a/source-linux/images/smileys/babies/baby.gif b/source-linux/images/smileys/babies/baby.gif
deleted file mode 100644
index d105afb..0000000
Binary files a/source-linux/images/smileys/babies/baby.gif and /dev/null differ
diff --git a/source-linux/images/smileys/babies/babycot.gif b/source-linux/images/smileys/babies/babycot.gif
deleted file mode 100644
index 750f6df..0000000
Binary files a/source-linux/images/smileys/babies/babycot.gif and /dev/null differ
diff --git a/source-linux/images/smileys/babies/pregnant.gif b/source-linux/images/smileys/babies/pregnant.gif
deleted file mode 100644
index d97f476..0000000
Binary files a/source-linux/images/smileys/babies/pregnant.gif and /dev/null differ
diff --git a/source-linux/images/smileys/babies/stork.gif b/source-linux/images/smileys/babies/stork.gif
deleted file mode 100644
index de2371d..0000000
Binary files a/source-linux/images/smileys/babies/stork.gif and /dev/null differ
diff --git a/source-linux/images/smileys/confused/confused.gif b/source-linux/images/smileys/confused/confused.gif
deleted file mode 100644
index 8f1b79a..0000000
Binary files a/source-linux/images/smileys/confused/confused.gif and /dev/null differ
diff --git a/source-linux/images/smileys/confused/dazed.gif b/source-linux/images/smileys/confused/dazed.gif
deleted file mode 100644
index f5e7ec2..0000000
Binary files a/source-linux/images/smileys/confused/dazed.gif and /dev/null differ
diff --git a/source-linux/images/smileys/confused/shrug.gif b/source-linux/images/smileys/confused/shrug.gif
deleted file mode 100644
index 31ce007..0000000
Binary files a/source-linux/images/smileys/confused/shrug.gif and /dev/null differ
diff --git a/source-linux/images/smileys/confused/stupid.gif b/source-linux/images/smileys/confused/stupid.gif
deleted file mode 100644
index c17170a..0000000
Binary files a/source-linux/images/smileys/confused/stupid.gif and /dev/null differ
diff --git a/source-linux/images/smileys/cool/affro.gif b/source-linux/images/smileys/cool/affro.gif
deleted file mode 100644
index f06166b..0000000
Binary files a/source-linux/images/smileys/cool/affro.gif and /dev/null differ
diff --git a/source-linux/images/smileys/cool/cool.gif b/source-linux/images/smileys/cool/cool.gif
deleted file mode 100644
index 05ba9f1..0000000
Binary files a/source-linux/images/smileys/cool/cool.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/beer_mug.gif b/source-linux/images/smileys/core/beer_mug.gif
deleted file mode 100644
index 9a3e051..0000000
Binary files a/source-linux/images/smileys/core/beer_mug.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/coffee.gif b/source-linux/images/smileys/core/coffee.gif
deleted file mode 100644
index 7e20371..0000000
Binary files a/source-linux/images/smileys/core/coffee.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/dislike.gif b/source-linux/images/smileys/core/dislike.gif
deleted file mode 100644
index 7777942..0000000
Binary files a/source-linux/images/smileys/core/dislike.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/friendica-16.png b/source-linux/images/smileys/core/friendica-16.png
deleted file mode 100644
index 745b7ac..0000000
Binary files a/source-linux/images/smileys/core/friendica-16.png and /dev/null differ
diff --git a/source-linux/images/smileys/core/like.gif b/source-linux/images/smileys/core/like.gif
deleted file mode 100644
index f71d032..0000000
Binary files a/source-linux/images/smileys/core/like.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/rm-16.png b/source-linux/images/smileys/core/rm-16.png
deleted file mode 100644
index 9361ef2..0000000
Binary files a/source-linux/images/smileys/core/rm-16.png and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-Oo.gif b/source-linux/images/smileys/core/smiley-Oo.gif
deleted file mode 100644
index a15d974..0000000
Binary files a/source-linux/images/smileys/core/smiley-Oo.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-bangheaddesk.gif b/source-linux/images/smileys/core/smiley-bangheaddesk.gif
deleted file mode 100644
index 91ccb8b..0000000
Binary files a/source-linux/images/smileys/core/smiley-bangheaddesk.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-brokenheart.gif b/source-linux/images/smileys/core/smiley-brokenheart.gif
deleted file mode 100644
index 971b57f..0000000
Binary files a/source-linux/images/smileys/core/smiley-brokenheart.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-cool.gif b/source-linux/images/smileys/core/smiley-cool.gif
deleted file mode 100644
index cee1c1a..0000000
Binary files a/source-linux/images/smileys/core/smiley-cool.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-cry.gif b/source-linux/images/smileys/core/smiley-cry.gif
deleted file mode 100644
index 06e6ca2..0000000
Binary files a/source-linux/images/smileys/core/smiley-cry.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-embarassed.gif b/source-linux/images/smileys/core/smiley-embarassed.gif
deleted file mode 100644
index adc12e7..0000000
Binary files a/source-linux/images/smileys/core/smiley-embarassed.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-facepalm.gif b/source-linux/images/smileys/core/smiley-facepalm.gif
deleted file mode 100644
index 7243703..0000000
Binary files a/source-linux/images/smileys/core/smiley-facepalm.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-foot-in-mouth.gif b/source-linux/images/smileys/core/smiley-foot-in-mouth.gif
deleted file mode 100644
index b444e57..0000000
Binary files a/source-linux/images/smileys/core/smiley-foot-in-mouth.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-frown.gif b/source-linux/images/smileys/core/smiley-frown.gif
deleted file mode 100644
index 9ff1985..0000000
Binary files a/source-linux/images/smileys/core/smiley-frown.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-heart.gif b/source-linux/images/smileys/core/smiley-heart.gif
deleted file mode 100644
index 6a11e70..0000000
Binary files a/source-linux/images/smileys/core/smiley-heart.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-kiss.gif b/source-linux/images/smileys/core/smiley-kiss.gif
deleted file mode 100644
index cc35661..0000000
Binary files a/source-linux/images/smileys/core/smiley-kiss.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-laughing.gif b/source-linux/images/smileys/core/smiley-laughing.gif
deleted file mode 100644
index 1bf29de..0000000
Binary files a/source-linux/images/smileys/core/smiley-laughing.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-smile.gif b/source-linux/images/smileys/core/smiley-smile.gif
deleted file mode 100644
index b9bff40..0000000
Binary files a/source-linux/images/smileys/core/smiley-smile.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-surprised.gif b/source-linux/images/smileys/core/smiley-surprised.gif
deleted file mode 100644
index b074653..0000000
Binary files a/source-linux/images/smileys/core/smiley-surprised.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-thumbsup.gif b/source-linux/images/smileys/core/smiley-thumbsup.gif
deleted file mode 100644
index 1bc6b12..0000000
Binary files a/source-linux/images/smileys/core/smiley-thumbsup.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-tongue-out.gif b/source-linux/images/smileys/core/smiley-tongue-out.gif
deleted file mode 100644
index 48867dc..0000000
Binary files a/source-linux/images/smileys/core/smiley-tongue-out.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-undecided.gif b/source-linux/images/smileys/core/smiley-undecided.gif
deleted file mode 100644
index 2802979..0000000
Binary files a/source-linux/images/smileys/core/smiley-undecided.gif and /dev/null differ
diff --git a/source-linux/images/smileys/core/smiley-wink.gif b/source-linux/images/smileys/core/smiley-wink.gif
deleted file mode 100644
index e1cefb0..0000000
Binary files a/source-linux/images/smileys/core/smiley-wink.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/angel.gif b/source-linux/images/smileys/devilangel/angel.gif
deleted file mode 100644
index 8e58541..0000000
Binary files a/source-linux/images/smileys/devilangel/angel.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/blondedevil.gif b/source-linux/images/smileys/devilangel/blondedevil.gif
deleted file mode 100644
index 09e7e68..0000000
Binary files a/source-linux/images/smileys/devilangel/blondedevil.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/catdevil.gif b/source-linux/images/smileys/devilangel/catdevil.gif
deleted file mode 100644
index 269d719..0000000
Binary files a/source-linux/images/smileys/devilangel/catdevil.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/cherub.gif b/source-linux/images/smileys/devilangel/cherub.gif
deleted file mode 100644
index 40872e0..0000000
Binary files a/source-linux/images/smileys/devilangel/cherub.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/daseesaw.gif b/source-linux/images/smileys/devilangel/daseesaw.gif
deleted file mode 100644
index 1c04b2e..0000000
Binary files a/source-linux/images/smileys/devilangel/daseesaw.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/devil.gif b/source-linux/images/smileys/devilangel/devil.gif
deleted file mode 100644
index 2b56797..0000000
Binary files a/source-linux/images/smileys/devilangel/devil.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/graveside.gif b/source-linux/images/smileys/devilangel/graveside.gif
deleted file mode 100644
index 0e90935..0000000
Binary files a/source-linux/images/smileys/devilangel/graveside.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/saint.gif b/source-linux/images/smileys/devilangel/saint.gif
deleted file mode 100644
index 52c22c4..0000000
Binary files a/source-linux/images/smileys/devilangel/saint.gif and /dev/null differ
diff --git a/source-linux/images/smileys/devilangel/turnevil.gif b/source-linux/images/smileys/devilangel/turnevil.gif
deleted file mode 100644
index 1490c0f..0000000
Binary files a/source-linux/images/smileys/devilangel/turnevil.gif and /dev/null differ
diff --git a/source-linux/images/smileys/disgust/fartblush.gif b/source-linux/images/smileys/disgust/fartblush.gif
deleted file mode 100644
index 4160a1f..0000000
Binary files a/source-linux/images/smileys/disgust/fartblush.gif and /dev/null differ
diff --git a/source-linux/images/smileys/disgust/fartinbed.gif b/source-linux/images/smileys/disgust/fartinbed.gif
deleted file mode 100644
index 5553649..0000000
Binary files a/source-linux/images/smileys/disgust/fartinbed.gif and /dev/null differ
diff --git a/source-linux/images/smileys/disgust/toilet.gif b/source-linux/images/smileys/disgust/toilet.gif
deleted file mode 100644
index 092d7ca..0000000
Binary files a/source-linux/images/smileys/disgust/toilet.gif and /dev/null differ
diff --git a/source-linux/images/smileys/disgust/vomit.gif b/source-linux/images/smileys/disgust/vomit.gif
deleted file mode 100644
index 6e7e727..0000000
Binary files a/source-linux/images/smileys/disgust/vomit.gif and /dev/null differ
diff --git a/source-linux/images/smileys/drink/tea.gif b/source-linux/images/smileys/drink/tea.gif
deleted file mode 100644
index 474b989..0000000
Binary files a/source-linux/images/smileys/drink/tea.gif and /dev/null differ
diff --git a/source-linux/images/smileys/drool/drool.gif b/source-linux/images/smileys/drool/drool.gif
deleted file mode 100644
index 4093df6..0000000
Binary files a/source-linux/images/smileys/drool/drool.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/alienmonster.gif b/source-linux/images/smileys/fantasy/alienmonster.gif
deleted file mode 100644
index e0ca7f6..0000000
Binary files a/source-linux/images/smileys/fantasy/alienmonster.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/barbarian.gif b/source-linux/images/smileys/fantasy/barbarian.gif
deleted file mode 100644
index de8a068..0000000
Binary files a/source-linux/images/smileys/fantasy/barbarian.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/dinosaur.gif b/source-linux/images/smileys/fantasy/dinosaur.gif
deleted file mode 100644
index e8c625c..0000000
Binary files a/source-linux/images/smileys/fantasy/dinosaur.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/dragon.gif b/source-linux/images/smileys/fantasy/dragon.gif
deleted file mode 100644
index fd28fbf..0000000
Binary files a/source-linux/images/smileys/fantasy/dragon.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/dragonwhelp.gif b/source-linux/images/smileys/fantasy/dragonwhelp.gif
deleted file mode 100644
index dbc4555..0000000
Binary files a/source-linux/images/smileys/fantasy/dragonwhelp.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/ghost.gif b/source-linux/images/smileys/fantasy/ghost.gif
deleted file mode 100644
index 4c5d85d..0000000
Binary files a/source-linux/images/smileys/fantasy/ghost.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fantasy/mummy.gif b/source-linux/images/smileys/fantasy/mummy.gif
deleted file mode 100644
index 50e1dfb..0000000
Binary files a/source-linux/images/smileys/fantasy/mummy.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/2guns.gif b/source-linux/images/smileys/fight/2guns.gif
deleted file mode 100644
index 9e1b663..0000000
Binary files a/source-linux/images/smileys/fight/2guns.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/acid.gif b/source-linux/images/smileys/fight/acid.gif
deleted file mode 100644
index fa55f67..0000000
Binary files a/source-linux/images/smileys/fight/acid.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/alienfight.gif b/source-linux/images/smileys/fight/alienfight.gif
deleted file mode 100644
index 9d5e879..0000000
Binary files a/source-linux/images/smileys/fight/alienfight.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/alpha.png b/source-linux/images/smileys/fight/alpha.png
deleted file mode 100644
index 09e3f23..0000000
Binary files a/source-linux/images/smileys/fight/alpha.png and /dev/null differ
diff --git a/source-linux/images/smileys/fight/army.gif b/source-linux/images/smileys/fight/army.gif
deleted file mode 100644
index 7506700..0000000
Binary files a/source-linux/images/smileys/fight/army.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/arrowhead.gif b/source-linux/images/smileys/fight/arrowhead.gif
deleted file mode 100644
index f4572c4..0000000
Binary files a/source-linux/images/smileys/fight/arrowhead.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/bfg.gif b/source-linux/images/smileys/fight/bfg.gif
deleted file mode 100644
index c2ba9d0..0000000
Binary files a/source-linux/images/smileys/fight/bfg.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/bowman.gif b/source-linux/images/smileys/fight/bowman.gif
deleted file mode 100644
index 2f1f8f0..0000000
Binary files a/source-linux/images/smileys/fight/bowman.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/chainsaw.gif b/source-linux/images/smileys/fight/chainsaw.gif
deleted file mode 100644
index 71f757c..0000000
Binary files a/source-linux/images/smileys/fight/chainsaw.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/crossbow.gif b/source-linux/images/smileys/fight/crossbow.gif
deleted file mode 100644
index 20874f3..0000000
Binary files a/source-linux/images/smileys/fight/crossbow.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/crusader.gif b/source-linux/images/smileys/fight/crusader.gif
deleted file mode 100644
index 95848ae..0000000
Binary files a/source-linux/images/smileys/fight/crusader.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/dead.gif b/source-linux/images/smileys/fight/dead.gif
deleted file mode 100644
index 31adaba..0000000
Binary files a/source-linux/images/smileys/fight/dead.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/gangs.gif b/source-linux/images/smileys/fight/gangs.gif
deleted file mode 100644
index 2c655b1..0000000
Binary files a/source-linux/images/smileys/fight/gangs.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/hammersplat.gif b/source-linux/images/smileys/fight/hammersplat.gif
deleted file mode 100644
index 95bd540..0000000
Binary files a/source-linux/images/smileys/fight/hammersplat.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/lasergun.gif b/source-linux/images/smileys/fight/lasergun.gif
deleted file mode 100644
index f3f82cb..0000000
Binary files a/source-linux/images/smileys/fight/lasergun.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/machinegun.gif b/source-linux/images/smileys/fight/machinegun.gif
deleted file mode 100644
index 1cff5cc..0000000
Binary files a/source-linux/images/smileys/fight/machinegun.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/marine.gif b/source-linux/images/smileys/fight/marine.gif
deleted file mode 100644
index 88fd2e0..0000000
Binary files a/source-linux/images/smileys/fight/marine.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/sabre.gif b/source-linux/images/smileys/fight/sabre.gif
deleted file mode 100644
index e623968..0000000
Binary files a/source-linux/images/smileys/fight/sabre.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/samurai.gif b/source-linux/images/smileys/fight/samurai.gif
deleted file mode 100644
index 8b24385..0000000
Binary files a/source-linux/images/smileys/fight/samurai.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/tank.gif b/source-linux/images/smileys/fight/tank.gif
deleted file mode 100644
index f1d969d..0000000
Binary files a/source-linux/images/smileys/fight/tank.gif and /dev/null differ
diff --git a/source-linux/images/smileys/fight/viking.gif b/source-linux/images/smileys/fight/viking.gif
deleted file mode 100644
index 4908edd..0000000
Binary files a/source-linux/images/smileys/fight/viking.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/apple.gif b/source-linux/images/smileys/food/apple.gif
deleted file mode 100644
index 969d4ca..0000000
Binary files a/source-linux/images/smileys/food/apple.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/banana.gif b/source-linux/images/smileys/food/banana.gif
deleted file mode 100644
index d990d19..0000000
Binary files a/source-linux/images/smileys/food/banana.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/birthdaycake.gif b/source-linux/images/smileys/food/birthdaycake.gif
deleted file mode 100644
index 30ebceb..0000000
Binary files a/source-linux/images/smileys/food/birthdaycake.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/broccoli.gif b/source-linux/images/smileys/food/broccoli.gif
deleted file mode 100644
index f379889..0000000
Binary files a/source-linux/images/smileys/food/broccoli.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/cake.gif b/source-linux/images/smileys/food/cake.gif
deleted file mode 100644
index 22d0ebd..0000000
Binary files a/source-linux/images/smileys/food/cake.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/carrot.gif b/source-linux/images/smileys/food/carrot.gif
deleted file mode 100644
index 387b94c..0000000
Binary files a/source-linux/images/smileys/food/carrot.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/cooking.gif b/source-linux/images/smileys/food/cooking.gif
deleted file mode 100644
index e62fea0..0000000
Binary files a/source-linux/images/smileys/food/cooking.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/fryegg.gif b/source-linux/images/smileys/food/fryegg.gif
deleted file mode 100644
index bd1b4ff..0000000
Binary files a/source-linux/images/smileys/food/fryegg.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/popcorn.gif b/source-linux/images/smileys/food/popcorn.gif
deleted file mode 100644
index b0ea697..0000000
Binary files a/source-linux/images/smileys/food/popcorn.gif and /dev/null differ
diff --git a/source-linux/images/smileys/food/tomato.gif b/source-linux/images/smileys/food/tomato.gif
deleted file mode 100644
index 0e3dadd..0000000
Binary files a/source-linux/images/smileys/food/tomato.gif and /dev/null differ
diff --git a/source-linux/images/smileys/happy/cloud9.gif b/source-linux/images/smileys/happy/cloud9.gif
deleted file mode 100644
index 801c1a3..0000000
Binary files a/source-linux/images/smileys/happy/cloud9.gif and /dev/null differ
diff --git a/source-linux/images/smileys/happy/tearsofjoy.gif b/source-linux/images/smileys/happy/tearsofjoy.gif
deleted file mode 100644
index 5de3117..0000000
Binary files a/source-linux/images/smileys/happy/tearsofjoy.gif and /dev/null differ
diff --git a/source-linux/images/smileys/laugh/hahaha.gif b/source-linux/images/smileys/laugh/hahaha.gif
deleted file mode 100644
index 37aa92a..0000000
Binary files a/source-linux/images/smileys/laugh/hahaha.gif and /dev/null differ
diff --git a/source-linux/images/smileys/laugh/loltv.gif b/source-linux/images/smileys/laugh/loltv.gif
deleted file mode 100644
index 3de6f77..0000000
Binary files a/source-linux/images/smileys/laugh/loltv.gif and /dev/null differ
diff --git a/source-linux/images/smileys/laugh/rofl.gif b/source-linux/images/smileys/laugh/rofl.gif
deleted file mode 100644
index a3bb03d..0000000
Binary files a/source-linux/images/smileys/laugh/rofl.gif and /dev/null differ
diff --git a/source-linux/images/smileys/love/iloveyou.gif b/source-linux/images/smileys/love/iloveyou.gif
deleted file mode 100644
index 7007515..0000000
Binary files a/source-linux/images/smileys/love/iloveyou.gif and /dev/null differ
diff --git a/source-linux/images/smileys/love/inlove.gif b/source-linux/images/smileys/love/inlove.gif
deleted file mode 100644
index 30357af..0000000
Binary files a/source-linux/images/smileys/love/inlove.gif and /dev/null differ
diff --git a/source-linux/images/smileys/love/love.gif b/source-linux/images/smileys/love/love.gif
deleted file mode 100644
index d8f0d5b..0000000
Binary files a/source-linux/images/smileys/love/love.gif and /dev/null differ
diff --git a/source-linux/images/smileys/love/lovebear.gif b/source-linux/images/smileys/love/lovebear.gif
deleted file mode 100644
index d13fd18..0000000
Binary files a/source-linux/images/smileys/love/lovebear.gif and /dev/null differ
diff --git a/source-linux/images/smileys/love/lovebed.gif b/source-linux/images/smileys/love/lovebed.gif
deleted file mode 100644
index c5783e0..0000000
Binary files a/source-linux/images/smileys/love/lovebed.gif and /dev/null differ
diff --git a/source-linux/images/smileys/love/loveheart.gif b/source-linux/images/smileys/love/loveheart.gif
deleted file mode 100644
index 541220a..0000000
Binary files a/source-linux/images/smileys/love/loveheart.gif and /dev/null differ
diff --git a/source-linux/images/smileys/music/dj.gif b/source-linux/images/smileys/music/dj.gif
deleted file mode 100644
index 66bc075..0000000
Binary files a/source-linux/images/smileys/music/dj.gif and /dev/null differ
diff --git a/source-linux/images/smileys/music/drums.gif b/source-linux/images/smileys/music/drums.gif
deleted file mode 100644
index 27215f4..0000000
Binary files a/source-linux/images/smileys/music/drums.gif and /dev/null differ
diff --git a/source-linux/images/smileys/music/elvis.gif b/source-linux/images/smileys/music/elvis.gif
deleted file mode 100644
index ebcdccc..0000000
Binary files a/source-linux/images/smileys/music/elvis.gif and /dev/null differ
diff --git a/source-linux/images/smileys/music/guitar.gif b/source-linux/images/smileys/music/guitar.gif
deleted file mode 100644
index 11eccdd..0000000
Binary files a/source-linux/images/smileys/music/guitar.gif and /dev/null differ
diff --git a/source-linux/images/smileys/music/trumpet.gif b/source-linux/images/smileys/music/trumpet.gif
deleted file mode 100644
index 4595ccc..0000000
Binary files a/source-linux/images/smileys/music/trumpet.gif and /dev/null differ
diff --git a/source-linux/images/smileys/music/violin.gif b/source-linux/images/smileys/music/violin.gif
deleted file mode 100644
index 53592d6..0000000
Binary files a/source-linux/images/smileys/music/violin.gif and /dev/null differ
diff --git a/source-linux/images/smileys/oldcore/beard.png b/source-linux/images/smileys/oldcore/beard.png
deleted file mode 100644
index 5d4b284..0000000
Binary files a/source-linux/images/smileys/oldcore/beard.png and /dev/null differ
diff --git a/source-linux/images/smileys/oldcore/headbang.gif b/source-linux/images/smileys/oldcore/headbang.gif
deleted file mode 100644
index 91ccb8b..0000000
Binary files a/source-linux/images/smileys/oldcore/headbang.gif and /dev/null differ
diff --git a/source-linux/images/smileys/oldcore/laughing.gif b/source-linux/images/smileys/oldcore/laughing.gif
deleted file mode 100644
index 1bf29de..0000000
Binary files a/source-linux/images/smileys/oldcore/laughing.gif and /dev/null differ
diff --git a/source-linux/images/smileys/oldcore/shaka.gif b/source-linux/images/smileys/oldcore/shaka.gif
deleted file mode 100644
index e5d7b70..0000000
Binary files a/source-linux/images/smileys/oldcore/shaka.gif and /dev/null differ
diff --git a/source-linux/images/smileys/oldcore/surprised.gif b/source-linux/images/smileys/oldcore/surprised.gif
deleted file mode 100644
index b074653..0000000
Binary files a/source-linux/images/smileys/oldcore/surprised.gif and /dev/null differ
diff --git a/source-linux/images/smileys/oldcore/whitebeard.png b/source-linux/images/smileys/oldcore/whitebeard.png
deleted file mode 100644
index 2a1fccb..0000000
Binary files a/source-linux/images/smileys/oldcore/whitebeard.png and /dev/null differ
diff --git a/source-linux/images/smileys/respect/bow.gif b/source-linux/images/smileys/respect/bow.gif
deleted file mode 100644
index ecc6484..0000000
Binary files a/source-linux/images/smileys/respect/bow.gif and /dev/null differ
diff --git a/source-linux/images/smileys/respect/bravo.gif b/source-linux/images/smileys/respect/bravo.gif
deleted file mode 100644
index 34f72ab..0000000
Binary files a/source-linux/images/smileys/respect/bravo.gif and /dev/null differ
diff --git a/source-linux/images/smileys/respect/hailking.gif b/source-linux/images/smileys/respect/hailking.gif
deleted file mode 100644
index 07551e5..0000000
Binary files a/source-linux/images/smileys/respect/hailking.gif and /dev/null differ
diff --git a/source-linux/images/smileys/respect/number1.gif b/source-linux/images/smileys/respect/number1.gif
deleted file mode 100644
index ab5c410..0000000
Binary files a/source-linux/images/smileys/respect/number1.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sad/crying.png b/source-linux/images/smileys/sad/crying.png
deleted file mode 100644
index 62b9646..0000000
Binary files a/source-linux/images/smileys/sad/crying.png and /dev/null differ
diff --git a/source-linux/images/smileys/sad/prisoner.gif b/source-linux/images/smileys/sad/prisoner.gif
deleted file mode 100644
index f2c3181..0000000
Binary files a/source-linux/images/smileys/sad/prisoner.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sad/sigh.gif b/source-linux/images/smileys/sad/sigh.gif
deleted file mode 100644
index 6860226..0000000
Binary files a/source-linux/images/smileys/sad/sigh.gif and /dev/null differ
diff --git a/source-linux/images/smileys/smoking/smoking.gif b/source-linux/images/smileys/smoking/smoking.gif
deleted file mode 100644
index 77720b1..0000000
Binary files a/source-linux/images/smileys/smoking/smoking.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/archery.gif b/source-linux/images/smileys/sport/archery.gif
deleted file mode 100644
index 8b4b9f6..0000000
Binary files a/source-linux/images/smileys/sport/archery.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/basketball.gif b/source-linux/images/smileys/sport/basketball.gif
deleted file mode 100644
index e9ad4b5..0000000
Binary files a/source-linux/images/smileys/sport/basketball.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/bowling.gif b/source-linux/images/smileys/sport/bowling.gif
deleted file mode 100644
index 0f8300c..0000000
Binary files a/source-linux/images/smileys/sport/bowling.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/cycling.gif b/source-linux/images/smileys/sport/cycling.gif
deleted file mode 100644
index 332081e..0000000
Binary files a/source-linux/images/smileys/sport/cycling.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/darts.gif b/source-linux/images/smileys/sport/darts.gif
deleted file mode 100644
index 09fb6ea..0000000
Binary files a/source-linux/images/smileys/sport/darts.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/fencing.gif b/source-linux/images/smileys/sport/fencing.gif
deleted file mode 100644
index a4ec5cd..0000000
Binary files a/source-linux/images/smileys/sport/fencing.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/football.gif b/source-linux/images/smileys/sport/football.gif
deleted file mode 100644
index c9fa6c5..0000000
Binary files a/source-linux/images/smileys/sport/football.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/golf.gif b/source-linux/images/smileys/sport/golf.gif
deleted file mode 100644
index 179fc52..0000000
Binary files a/source-linux/images/smileys/sport/golf.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/horseriding.gif b/source-linux/images/smileys/sport/horseriding.gif
deleted file mode 100644
index 13ca450..0000000
Binary files a/source-linux/images/smileys/sport/horseriding.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/juggling.gif b/source-linux/images/smileys/sport/juggling.gif
deleted file mode 100644
index 1a2eb60..0000000
Binary files a/source-linux/images/smileys/sport/juggling.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/skipping.gif b/source-linux/images/smileys/sport/skipping.gif
deleted file mode 100644
index f63270b..0000000
Binary files a/source-linux/images/smileys/sport/skipping.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/snooker.gif b/source-linux/images/smileys/sport/snooker.gif
deleted file mode 100644
index fa2e6a8..0000000
Binary files a/source-linux/images/smileys/sport/snooker.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/surfing.gif b/source-linux/images/smileys/sport/surfing.gif
deleted file mode 100644
index b75d74b..0000000
Binary files a/source-linux/images/smileys/sport/surfing.gif and /dev/null differ
diff --git a/source-linux/images/smileys/sport/tennis.gif b/source-linux/images/smileys/sport/tennis.gif
deleted file mode 100644
index 36e47bf..0000000
Binary files a/source-linux/images/smileys/sport/tennis.gif and /dev/null differ
diff --git a/source-linux/images/smileys/tired/countsheep.gif b/source-linux/images/smileys/tired/countsheep.gif
deleted file mode 100644
index 815b090..0000000
Binary files a/source-linux/images/smileys/tired/countsheep.gif and /dev/null differ
diff --git a/source-linux/images/smileys/tired/hammock.gif b/source-linux/images/smileys/tired/hammock.gif
deleted file mode 100644
index 8639dd3..0000000
Binary files a/source-linux/images/smileys/tired/hammock.gif and /dev/null differ
diff --git a/source-linux/images/smileys/tired/pillow.gif b/source-linux/images/smileys/tired/pillow.gif
deleted file mode 100644
index 367f65e..0000000
Binary files a/source-linux/images/smileys/tired/pillow.gif and /dev/null differ
diff --git a/source-linux/images/smileys/tired/yawn.gif b/source-linux/images/smileys/tired/yawn.gif
deleted file mode 100644
index d451480..0000000
Binary files a/source-linux/images/smileys/tired/yawn.gif and /dev/null differ
diff --git a/source-linux/js/helper.js b/source-linux/js/helper.js
deleted file mode 100644
index 3bcb523..0000000
--- a/source-linux/js/helper.js
+++ /dev/null
@@ -1,193 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-
-function friendicaRequest(login,api,rootwindow,callback) {
- var xhrequest= new XMLHttpRequest();
- xhrequest.onreadystatechange = function() {
- if(xhrequest.readyState === XMLHttpRequest.DONE) {
- try{
- if (xhrequest.status==200){
- callback(xhrequest.responseText)
- }else{
- showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
- }
- }
- catch (e){
- showMessage("Error", "API:\n" +login.server+api+"\n"+e+"\n Return: "+xhrequest.responseText,rootwindow)
- }
- }
- }
- xhrequest.open("GET", login.server+api,true,login.username,Qt.atob(login.password));
- xhrequest.send();
-}
-
-function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
- var xhrequest= new XMLHttpRequest();
- xhrequest.onreadystatechange = function() {
- //print(api+JSON.stringify(login)+Qt.atob(login.password));
- if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
- } else if(xhrequest.readyState === XMLHttpRequest.DONE) {
- try{ if (xhrequest.responseText!=""){
- callback(xhrequest.responseText)
- }else{
- showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow)
- callback(xhrequest.responseText)
- }
- }
- catch (e){showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
- }
- }
- xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password));
- xhrequest.send(data);
-}
-
-function getCount(database,login,table,field,countvalue){
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- var count=0;
- db.transaction( function(tx) {
- var countrs = tx.executeSql('SELECT COUNT(*) from '+table+' WHERE username= "'+ login.username +'" AND '+field+' = "'+countvalue+'"');
- count = parseInt(countrs.rows.item(0)["COUNT(*)"])
- })
- return count
-}
-
-function friendicaWebRequest(url,rootwindow,callback) {
- var xhrequest = new XMLHttpRequest();
- xhrequest.onreadystatechange = function() {
- if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {}
- else if(xhrequest.readyState === XMLHttpRequest.DONE) {
- try{callback(xhrequest.responseText)}
- catch (e){showMessage("Error","API:\n" +url+" "+e+"\n Return: "+xhrequest.responseText, rootwindow)}
- }
- }
- xhrequest.open("GET", url,true);
- xhrequest.send();
-}
-
-function friendicaXmlRequest(url,rootwindow,callback) {
- var xhrequest = new XMLHttpRequest();
- xhrequest.onreadystatechange = function() {
- if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {}
- else if(xhrequest.readyState === XMLHttpRequest.DONE) {
- try{callback(xhrequest.responseXML)}
- catch (e){showMessage("Error","API:\n" +url+" "+e+"\n Return: "+xhrequest.responseText, rootwindow)}
- }
- }
- xhrequest.open("GET", url);
- xhrequest.responseType ="document";
- xhrequest.send();
-}
-
-function friendicaRemoteAuthRequest(login,url,c_url,rootwindow,callback) {
- var xhrequest = new XMLHttpRequest();
- xhrequest.onreadystatechange = function() {
- if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {}
- else if(xhrequest.readyState === XMLHttpRequest.DONE) {
- try{callback(xhrequest.responseText)}
- catch (e){showMessage("Error","Url:\n" +url+" "+e+"\n Return: "+xhrequest.responseText, rootwindow)}
- }
- }
- xhrequest.open("GET", login.server+"/api/friendica/remoteauth?c_url="+c_url+"&url="+url,true,login.username,Qt.atob(login.password));
- xhrequest.send();
-}
-
-
-function readData(database,table,username,callback,filter,filtervalue, sort) { // reads and applies data from DB
- if (filter){
- if (username){var where = " AND "+ filter +" = '" + filtervalue+"'";} else{
- var where = " WHERE "+ filter +" = '" + filtervalue+"'";}
- } else { var where="";}
- if (username){
- var user = ' where username= "'+ username +'"';
- } else { var user='';}
-
- if (sort){
- var sortparam = " ORDER BY "+ sort;
- } else { var sortparam="";}
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- if(!db) { return; }
- db.transaction( function(tx) {
- //print('select * from '+table+user+where+sortparam);
- var rsArray=[];
- var rs = tx.executeSql('select * from '+table+user+where+sortparam);
- for(var i = 0; i < rs.rows.length; i++) {
- rsArray.push(rs.rows.item(i))
- }
- callback(rsArray);
- });
-}
-
-function readField(field,database,table, username, callback,filter,filtervalue) { // reads and applies data from DB
-if (filter){
-var where = " AND "+ filter +" = '" + filtervalue+"'";
-} else { var where="";}
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- if(!db) { return; }
- db.transaction( function(tx) {
- //print('... read from database ' + field)
- var rsArray=[];
- //print('select DISTINCT '+field+' from '+table+' WHERE username="'+username+'"'+where+' ORDER BY '+field+' ASC');
- var rs = tx.executeSql('select DISTINCT '+field+' from '+table+' WHERE username="'+username+'"'+where+' ORDER BY '+field+' ASC');
- for(var i = 0; i < rs.rows.length; i++) {
- rsArray.push(rs.rows.item(i)[field])
- }
- callback(rsArray);
- });
-}
-
-function showMessage(header,message,rootwindow){//print(message);
- var cleanmessage=message.replace(/"/g,"-");
- if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
- var messageString='import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:"'+header+'";standardButtons: StandardButton.Ok; text:" '+cleanmessage+'"}';
- var messageObject=Qt.createQmlObject(messageString,rootwindow,"messageOutput");
-}
-
-function inArray(list, prop, val) {
- if (list.length > 0 ) {
- for (var i in list) { if (list[i][prop] == val) {
- return i;
- }
- }
- } return -1;
-}
-function cleanArray(array) {
-var arraystring=JSON.stringify(array);
- arraystring=arraystring.replace(/[\[\]]/g , '');
-return arraystring;
-}
-
-function cleanDate(date){
-var cleanedDate= date.slice(0,3)+", "+date.slice(8,11)+date.slice(4,7)+date.slice(25,30)+date.slice(10,25);
-return cleanedDate
-}
diff --git a/source-linux/js/image.js b/source-linux/js/image.js
deleted file mode 100644
index 9a91d09..0000000
--- a/source-linux/js/image.js
+++ /dev/null
@@ -1,286 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-.import "qrc:/js/helper.js" as Helperjs
-
-function requestList(login,database,onlynew,rootwindow,callback) {
- //get list of own images and call download function
- Helperjs.friendicaRequest(login,"/api/friendica/photos/list", rootwindow,function (helperobject){
- //print("return"+helperobject);
- var obj=JSON.parse(helperobject);
- if (onlynew){Helperjs.readField("id",database,"imageData",login.username,function(AllStoredImages){
- if (AllStoredImages.length>0){
- for(var i=0;i< AllStoredImages.length;i++){
- var position=Helperjs.inArray(obj,"id",AllStoredImages[i]);
- if (position>-1){obj.splice(position,1)}
- }
- }
- callback(obj)
- })}
- else{callback(obj)}
-})}
-
-function dataRequest(login,photoID,database,xhr,rootwindow) {
- // check if image exist and call download function
- Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photoID, rootwindow, function (image){
- try{ if(image==""){currentimageno=currentimageno+1}else{
- var obj = JSON.parse(image);
- var helpfilename=obj.filename.substring(0,obj.filename.lastIndexOf("."));
- var filesuffix="";
- if (obj.type=="image/jpeg"){filesuffix=".jpg"}
- else if (obj.type=="image/png"){filesuffix=".png"}
- else {filesuffix=""}
- if (helpfilename==""){// check if file has any filename
- obj.filename=obj["id"]+filesuffix;
- }
- else{obj.filename=helpfilename+filesuffix}
- var link="";
- if(obj["link"][0]){link=obj["link"][0]} else{link=obj["link"]["4"]}
- xhr.setUrl(Qt.resolvedUrl(link));
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setFilename(login.imagestore+'albums/'+obj.album+"/"+obj["filename"]);
- xhr.setDownloadtype("picture");
- xhr.download();
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var result = tx.executeSql('SELECT * from imageData where id = "'+obj["id"]+'"');
- if(result.rows.length === 1) {// use update
- result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+obj.id+'", created="'+obj.created+'", edited="'+obj.edited+'", profile="'+obj.profile+'", link="'+obj["link"]["4"]+'", filename="'+obj.filename+'",title="'+obj.title+'", desc="'+obj.desc+'", type="'+obj.type+'", width="'+obj.width+'", height="'+obj.height+'", album="'+obj.album+'", location="file://'+login.imagestore+'albums/'+obj.album+'/" where id="'+obj["id"]+'"');
- } else {// use insert print('... does not exists, create it')
- result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,obj.id,obj.created,obj.edited, obj.title, obj.desc, obj.album, obj.filename, obj.type, obj.height, obj.width,obj. profile,obj["link"]["4"],'file://'+login.imagestore+'albums/'+obj.album+"/"]);
- }
- })}}
- catch (e){print("Data retrieval failure! "+ e+obj);}
-})}
-
-function storeImagedata(login,database,imagedata,rootwindow) {
- // check if image exist and call download function
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var result = tx.executeSql('SELECT * from imageData where id = "'+imagedata["id"]+'"');
- if(result.rows.length === 1) {// use update
- result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+imagedata.id+'", created="'+imagedata.created+'", edited="'+imagedata.edited+'", profile="'+imagedata.profile+'", link="'+imagedata.link[0]+'", filename="'+imagedata.filename+'",title="'+imagedata.title+'", desc="'+imagedata.desc+'", type="'+imagedata.type+'", width="'+imagedata.width+'", height="'+imagedata.height+'", album="'+imagedata.album+'", location="file://'+login.imagestore+'albums/'+imagedata.album+'/" where id="'+imagedata["id"]+'"');
- } else {// use insert print('... does not exists, create it')
- result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,imagedata.id,imagedata.created,imagedata.edited, imagedata.title, imagedata.desc, imagedata.album, imagedata.filename, imagedata.type, imagedata.height, imagedata.width,imagedata. profile,imagedata.link[0],'file://'+login.imagestore+'albums/'+imagedata.album+"/"]);
- }
-})}
-
-function deleteImage(database,login,type,location,filesystem,rootwindow,callback) { // delete image locally and on server
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- var rsfilename=location.substring(location.lastIndexOf("/")+1,location.length);
- var rslocation=location.substring(0,location.lastIndexOf("/")+1);
- //print(type+" Name "+ rsfilename+" Location: "+rslocation)
- db.transaction( function(tx) {
- if (type=='image'){
- var rs= tx.executeSql('SELECT * FROM imageData WHERE filename="'+rsfilename+'" AND location="'+rslocation+'"')
- var imageId=rs.rows.item(0).id;
- Helperjs.friendicaPostRequest(login,"/api/friendica/photo/delete?photo_id="+imageId,"","DELETE",rootwindow, function (obj){
- //var deletereturn = JSON.parse(obj); print(obj);
- //if (deletereturn.result=="deleted"){
- db.transaction( function(tx) {
- var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+rslocation+'" AND filename="'+rsfilename+'"'); });
- filesystem.Directory=rslocation.substring(7,rslocation.length-1);
- filesystem.rmFile(rsfilename)
- //}
- })
- }
- else{
- Helperjs.friendicaPostRequest(login,"/api/friendica/photoalbum/delete?album="+rsfilename,"","DELETE",rootwindow, function (obj){
- //var deletereturn = JSON.parse(obj);
- //if (deletereturn.result=="deleted"){
- db.transaction( function(tx) {
- var rs= tx.executeSql('SELECT DISTINCT location FROM imageData WHERE album="'+rsfilename+'" AND username="'+login.username+'"');
- var locationstring=rs.rows.item(0).location;
- filesystem.Directory=locationstring.substring(7,locationstring.length-1);
- filesystem.rmDir();
- var deleters=tx.executeSql('DELETE FROM imageData WHERE album="'+location+'"');
- })
- //}
- })
- }
- callback(location)
- })
-}
-
-function updateImage(database,login,type,filesystem,imageId,rootwindow,callback) { // delete image locally and on server
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- Helperjs.readData(database,"imageData",login.username,function(obj){
- db.transaction( function(tx) {
- if (type=='image'){
- var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+obj[0].location+'" AND filename="'+obj[0].filename+'"');
- filesystem.Directory=obj[0].location
- filesystem.rmFile(obj[0].filename)
- }
- })
- },"id",imageId);
- callback()
-}
-
-
-function deleteContacts(database,user,callback) { // does nothing useful at the moment
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- //print(' delete Image Data() for ' + field +"="+selection)
- db.transaction( function(tx) {
- result1= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
- result2= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
- callback(result)})
-}
-
-//function requestFriendsAlbumPictures(login,friend,rootwindow,callback){
-//// screenscraping of albums page of contact without user and password
-// Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
-// //print(photohtml);
-// var photoarray=[];
-// var arr = photohtml.split("sidebar-photos-albums-li");
-// for (var i=2;i')-1);
-// var album={'link':albumlink,'name':albumname}
-// photoarray.push(album);
-// }
-// callback(photoarray)
-// })
-//}
-
-function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){
-// screenscraping of albums page of contact with remoteAuth
- Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
- try {var obj=JSON.parse(photohtml);
- if (obj.hasOwnProperty('status')){
- Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
- getAlbumFromHtml(photohtml,false,rootwindow,callback)})
- }}
- catch (e){
- getAlbumFromHtml(photohtml,true,rootwindow,callback)
- }
- })
-}
-
-function getAlbumFromHtml(photohtml,remoteAuthBool,rootwindow,callback){
- var photoarray=[];
- var arr = photohtml.split("sidebar-photos-albums-li");
- for (var i=2;i')-1);
- var album={'link':albumlink,'name':albumname}//print(albumlink+" "+albumname);
- photoarray.push(album);
- }
- callback(photoarray,remoteAuthBool)
-}
-
-
-function newRequestFriendsPictures(login,link,friend,remoteAuthBool,remoteauth,rootwindow,callback){
-// screenscraping of pictures page for given album
- if (remoteAuthBool){
- remoteauth.setUrl(login.server);
- remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
- remoteauth.setContacturl(friend.url);
- Helperjs.friendicaRemoteAuthRequest(login,link,friend.url,rootwindow,function(photohtml){
- getPictureFromHtml(photohtml,remoteAuthBool,function(photoarray){
- callback(photoarray)
- })
- })}
- else{
- Helperjs.friendicaWebRequest(link,rootwindow,function(photohtml){
- getPictureFromHtml(photohtml,remoteAuthBool,function(photoarray){
- callback(photoarray)
- })
- })
- }
-}
-
-function getPictureFromHtml(photohtml,remoteAuthBool,callback){
- var photoarray=[];
- var basehtml=photohtml.substring(photohtml.indexOf('',photohtml.indexOf('-1){ //theme 1
- var arr = photohtml.split("photo-album-image-wrapper-end");}
-
-// other themes
- if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
- var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
- var arr = photoarea.split("");}
- //print("Url: "+login.server+ "Contacturl: "+friend.url)
-// remoteauth.setUrl(login.server);
-// remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
-// remoteauth.setContacturl(friend.url);
- for (var i=0;i',photohtml.indexOf('-1){ //theme 1
- var arr = photohtml.split("photo-album-image-wrapper-end");}
-
-// other themes
- if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
- var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
- var arr = photoarea.split("");}
-
- for (var i=0;i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-function showFriends(db) {
- Service.readActiveConfig(db,function(login){
- Service.requestFriends(login.url,login.user,login.password,displayFriends);
- });
-}
-function displayFriends(obj){
- for (var i=0; i= c.x)
- f.contentX = c.x;
- else if (f.contentX+f.width <= c.x+c.width)
- f.contentX = c.x+c.width-f.width;
- if (f.contentY >= c.y)
- f.contentY = c.y;
- else if (f.contentY+f.height <= c.y+c.height)
- f.contentY = c.y+c.height-f.height;
-}
-
-function createObject(objectQml,qmlParameters,parentitem,callback) {
- var component = Qt.createComponent(objectQml);
- if (component.status === Component.Ready || component.status === Component.Error)
- finishCreation(component,qmlParameters,parentitem,callback);
- else
- component.statusChanged.connect(finishCreation(qmlParameters));
-}
-
-function finishCreation(component,qmlParameters,parentitem,callback) {
- if (component.status === Component.Ready) {
- var createdObject = component.createObject(parentitem, qmlParameters);
- if (createdObject === null)
- print("Error creating image"); }
- else if (component.status === Component.Error)
- print("Error loading component:"+component.errorString());
- else {print("created")}
- //callback(createdObject);
-}
-
diff --git a/source-linux/js/news.js b/source-linux/js/news.js
deleted file mode 100644
index a827f11..0000000
--- a/source-linux/js/news.js
+++ /dev/null
@@ -1,580 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-.import "qrc:/js/helper.js" as Helperjs
-
-function requestFriends(login,database,rootwindow,callback){
-// return array of friends
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var result = tx.executeSql('UPDATE contacts SET isFriend=0 where username="'+login.username+'"')}); // clean old friends
- Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
- var friends=JSON.parse(obj);
- for (var i=0;i0'+filtertext);
- //print('SELECT * from contacts WHERE username="'+login.username+'"'+filtertext);
- var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend>0'+filtertext);
- // check for friends
- var contactlist=[];
- for (var i=0;i'+lastDate);
- var result2 = tx.executeSql('SELECT url from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge > '+lastDate);
- for (var j=0;j0){
- for (var j=0;j0){
- for (var k=0;j0){var helpernews=newsrs.rows.item(0);
- var newscount=newsrs.rows.length;
- helpernews=fetchUsersForNews(database,user,helpernews,allcontacts);
- helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
- helpernews.text=Qt.atob(helpernews.text);
- helpernews.id=helpernews.status_id;
- if (helpernews.attachments!="" && helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
- callback(helpernews,newscount);}
-// var conversationobject={news:helpernews,newscount:newscount};
-// return conversationobject;
-})}
-
-
-
-
-function getAllContacts(database,user){
- var allcontacts=[];
- Helperjs.readData(database,"contacts",user,function(obj){
- allcontacts=obj;
- for (var n in allcontacts){
- allcontacts[n].name=Qt.atob(allcontacts[n].name);
- allcontacts[n].description=Qt.atob(allcontacts[n].description)
- }
- });
- return allcontacts;
-}
-
-function inArray(list, prop, val) {
- if (list.length > 0 ) {
- for (var i in list) {if (list[i][prop] == val) {
- return true;
- }
- }
- } return false;
-}
-
-function objFromArray(list, prop, val) {
- if (list.length > 0 ) {
- for (var i in list) {if (list[i][prop] == val) {
- return list[i];
- }
- }
- } return false;
-}
-
-function cleanDate(date){
- var cleanedDate= date.slice(0,3)+", "+date.slice(8,11)+date.slice(4,7)+date.slice(25,30)+date.slice(10,25);
- return cleanedDate
-}
diff --git a/source-linux/js/newsworker.js b/source-linux/js/newsworker.js
deleted file mode 100644
index 1be2bda..0000000
--- a/source-linux/js/newsworker.js
+++ /dev/null
@@ -1,198 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-function findend (text, startpos) {
- var indexOf = text.substring(startpos || 0).search(/\s/);
- return (indexOf >= 0) ? (indexOf + (startpos || 0)) : text.length;
-}
-
-
-WorkerScript.onMessage = function(msg) {
-if(msg.deleteId!==undefined)
- {msg.model.remove(msg.deleteId);
- msg.model.sync()
-}
-else{
- if(msg.method=="refresh"){msg.model.clear()};
- msg.model.sync()
- for (var j=0;j0){
- if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")}
- else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")}
- }
- if (newsitemobject.friendica_activities.dislike.length>0){
- if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")}
- else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")}
- }
- if (newsitemobject.friendica_activities.attendyes.length>0){
- if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")}
- else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")}
- }
- if (newsitemobject.friendica_activities.attendno.length>0){
- if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")}
- else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")}
- }
- if (newsitemobject.friendica_activities.attendmaybe.length>0){
- if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")}
- else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")}
- }
- //var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
- if (newsitemobject.hasOwnProperty("friendica_activities_self")){
- if (newsitemobject.friendica_activities_self.indexOf(3)!=-1){self.attending=qsTr("yes")}
- if (newsitemobject.friendica_activities_self.indexOf(4)!=-1){self.attending=qsTr("no")}
- if (newsitemobject.friendica_activities_self.indexOf(5)!=-1){self.attending=qsTr("maybe")}
- if (newsitemobject.friendica_activities_self.indexOf(1)!=-1){self.liked=1}
- if (newsitemobject.friendica_activities_self.indexOf(2)!=-1){self.disliked=1}
- }}} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))}
- var friendica_activities={likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText,self:self}
- var attachmentList=[];
- var videoformats=["mp4", "avi", "webm","ogg","mp3"]
- try{if(newsitemobject.attachments){
- var attachArray=newsitemobject.attachments;
- for (var image in attachArray){
- var attachhelper={mimetype:attachArray[image].mimetype}
- var attachhelperstring=Qt.btoa(attachArray[image].url)
- var helperstringposition=newsitemobject.statusnet_html.indexOf(attachhelperstring);
- if (helperstringposition>-1){attachhelper.url=newsitemobject.statusnet_html.substring(newsitemobject.statusnet_html.lastIndexOf("http",helperstringposition),helperstringposition+attachhelperstring.length);
- if (attachArray[image].mimetype=="image/jpeg"){attachhelper.url=attachhelper.url+".jpg"}
- else if (attachArray[image].mimetype=="image/gif"){attachhelper.url=attachhelper.url+".gif"}
- else if (attachArray[image].mimetype=="image/png"){attachhelper.url=attachhelper.url+".png"}
- }
- else {attachhelper.url=attachArray[image].url}
- attachmentList.push(attachhelper)
- //print("Attachhelper "+attachhelper.url)
- newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url,"")
- newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4)+".jpeg","")
- newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4),"")
- }
- }
- }catch(e){print("attachment "+e)}
- for (var format in videoformats){
- if (newsitemobject.text.indexOf("."+videoformats[format])>-1){
- var videohelper={mimetype:"video/"+videoformats[format]}
- var videotext=newsitemobject.text;
- while (videotext.indexOf("."+videoformats[format])>-1){
- var videohelperstringposition=videotext.indexOf("."+videoformats[format]);
- videohelper.url=videotext.substring(videotext.lastIndexOf("http",videohelperstringposition),videohelperstringposition+4);
- videotext=videotext.substring(videohelperstringposition+4,videotext.length)
- if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=videohelper.url)){attachmentList.push(videohelper)}
- }
- }
- }
- if (newsitemobject.text.indexOf("/videos/watch/")>-1){
- var ptvideohelper={mimetype:"video/mp4"}
- var ptvideotext=newsitemobject.text;
- while (ptvideotext.indexOf("/videos/watch/")>-1){
- var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/");
- var ptposend=findend(ptvideotext,ptvideohelperstringposition);
- if(ptposend==-1){ptposend=ptvideotext.length};
- ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4";
- ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed");
- ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length)
- if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ptvideohelper.url)){attachmentList.push(ptvideohelper)}
- }
- }
-// if (newsitemobject.text.indexOf("https://www.youtube.com/watch")>-1){
-// //print("message "+msg.options.showWebsiteForLinks);
-// if (msg.options.showYoutube!="false"){
-// var ythelper={mimetype:"video/youtube"}
-// var yttext=newsitemobject.text;
-// while (yttext.indexOf("https://www.youtube.com/watch")>-1){
-// var ythelperstringposition=linktext.indexOf("watch?v=");
-// var ytposend=findend(yttext,ythelperstringposition);
-// ythelper.url=yttext.substring(yttext.lastIndexOf("http",linkhelperstringposition),linkposend);
-// linktext=linktext.substring(linkhelperstringposition+5,linktext.length)
-// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)}
-// }
-// }
-// }
-
-// if (newsitemobject.text.indexOf(".html")>-1){
-// //print("message "+msg.options.showWebsiteForLinks);
-// if (msg.options.showWebsiteForLinks!="false"){
-// var linkhelper={mimetype:"text/html"}
-// var linktext=newsitemobject.text;
-// while (linktext.indexOf(".html")>-1){
-// var linkhelperstringposition=linktext.indexOf(".html");
-// var linkposend=findend(linktext,linkhelperstringposition);
-// linkhelper.url=linktext.substring(linktext.lastIndexOf("http",linkhelperstringposition),linkposend);
-// linktext=linktext.substring(linkhelperstringposition+5,linktext.length)
-// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)}
-// }
-// }
-// }
-
- newsitemobject.attachmentList=attachmentList;
- var seconds=(msg.currentTime-newsitemobject.created_at)/1000;
- var timestring="";
- if (seconds<60) {timestring=seconds+" "+qsTr("seconds") +" "+qsTr("ago");}
- else if (seconds<90){timestring=Math.round(seconds/60)+" "+qsTr("minute") +" "+qsTr("ago");}
- else if (seconds<3600){timestring=Math.round(seconds/60)+" "+qsTr("minutes") +" "+qsTr("ago");}
- else if (seconds<5400){timestring=Math.round(seconds/3600)+" "+qsTr("hour") +" "+qsTr("ago");}
- else if (seconds<86400){timestring=Math.round(seconds/3600)+" "+qsTr("hours") +" "+qsTr("ago");}
- else if (seconds<129600){timestring=Math.round(seconds/86400)+" "+qsTr("day") +" "+qsTr("ago");}
- else if (seconds<3888000){timestring=Math.round(seconds/86400)+" "+qsTr("days") +" "+qsTr("ago");}
- else if (seconds<5832000){timestring=Math.round(seconds/3888000)+" "+qsTr("month") +" "+qsTr("ago");}
- else if (seconds<69984000){timestring=Math.round(seconds/3888000)+" "+qsTr("months") +" "+qsTr("ago");}
- else {timestring=Math.round(seconds/46656000)+" "+qsTr("years") +" "+qsTr("ago");}
-
- var data=({"newsitemobject": newsitemobject,"dateDiff":timestring,"friendica_activities":friendica_activities,"forumname":forumname})}
- //print("News:"+j+msg.news.length+JSON.stringify(data));
- if(msg.method=="append") {
- msg.model.insert(j, data)}
- else{
- msg.model.append(data)}
- }
-
- if (j==msg.news.length){
- //print("j: "+j+" msg.model.count: "+msg.model.count);
- msg.model.sync()
- }
-}
-}
diff --git a/source-linux/js/service.js b/source-linux/js/service.js
deleted file mode 100644
index 3b9588c..0000000
--- a/source-linux/js/service.js
+++ /dev/null
@@ -1,618 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-//.pragma library
-.import QtQuick.LocalStorage 2.0 as Sql
-.import "qrc:/js/helper.js" as Helperjs
-.import "qrc:/js/news.js" as Newsjs
-
-// CONFIG FUNCTIONS
-
-function initDatabase(database) { // initialize the database object
- var db =Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- //print('initDatabase()'+database[0]+database[1]+database[2]+database[3])
- db.transaction( function(tx) {
- //var version=tx.executeSql('PRAGMA user_version');print(JSON.stringify(version.rows.item(0)))
- tx.executeSql('CREATE TABLE IF NOT EXISTS imageData(username TEXT,id INT, created TEXT,edited TEXT, title TEXT, desc TEXT, album TEXT,filename TEXT, type TEXT, height INT, width INT, profile INT, link TEXT,location TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS config(server TEXT, username TEXT, password TEXT, imagestore TEXT, maxnews INT, timerInterval INT, newsViewType TEXT,isActive INT, permissions TEXT,maxContactAge INT,APIVersion TEXT,layout TEXT, addons TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS news(username TEXT, messagetype INT, text TEXT, created_at INT, in_reply_to_status_id INT, source TEXT, status_id INT, in_reply_to_user_id INT, geo TEXT,favorited TEXT, uid INT, statusnet_html TEXT, statusnet_conversation_id TEXT,friendica_activities TEXT, friendica_activities_self TEXT, attachments TEXT, friendica_owner TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS contacts(username TEXT, id INT, name TEXT, screen_name TEXT, location TEXT,imageAge INT, profile_image_url TEXT, description TEXT, profile_image BLOB, url TEXT, protected TEXT, followers_count INT, friends_count INT, created_at INT, favourites_count TEXT, utc_offset TEXT, time_zone TEXT, statuses_count INT, following TEXT, verified TEXT, statusnet_blocking TEXT, notifications TEXT, statusnet_profile_url TEXT, cid INT, network TEXT, isFriend INT, timestamp INT)');
-// tx.executeSql('CREATE INDEX IF NOT EXISTS contact_id ON contacts(id)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS profiles(username TEXT, id INT, profiledata TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS groups(username TEXT, groupname TEXT, gid INT, members TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS events(username TEXT, id INT, start INT, end INT, allday INT, title TEXT, j INT, d TEXT, isFirst INT, uid INT, cid INT, uri TEXT, created INT, edited INT, desc TEXT, location TEXT, type TEXT, nofinish TEXT, adjust INT, ignore INT, permissions TEXT, guid INT, itemid INT, plink TEXT, authorName TEXT, authorAvatar TEXT, authorLink TEXT, html TEXT)');
- tx.executeSql('CREATE TABLE IF NOT EXISTS globaloptions(k TEXT, v TEXT)')
-})}
-
-function cleanPermissions(oldperms){
- var newperms=oldperms.replace("<","");newperms=newperms.replace(">","");newperms="["+newperms+"]";
- var newpermArray=JSON.parse(newperms);
-return (newpermArray)
-}
-
-function getEvents(database,login,rootwindow,callback){
-var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- Helperjs.friendicaWebRequest(login.server+"/cal/"+login.username+"/json",rootwindow,function(obj){
- //Helperjs.friendicaRemoteAuthRequest(login,login.server+"/cal/"+login.username+"/json",login.server+"/profile/"+login.username,rootwindow,function(obj){
- var events = JSON.parse(obj);
- db.transaction( function(tx) {
- for (var i=0;i0){
- for(var i = 0; i < rs.rows.length; i++) {
- rsArray.push(rs.rows.item(i))
- }
- var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons};
- } else {var rsObject=""}
- callback(rsObject)}}
- )
-}
-
-function readActiveConfig(database){
- var obj;
- readConfig(database,function(config){obj=config},"isActive", 0);
- return obj;
-}
-
-function readGlobaloptions(database,callback){
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- var go=({});
- db.transaction( function(tx) {
- var rs = tx.executeSql('select * from globaloptions');
- for (var r=0; r0){ maxnews=maxnewsrs.rows.item(0).v};
- var newscountrs = tx.executeSql('SELECT COUNT(*) from news');
- var newscount = newscountrs.rows.item(0)["COUNT(*)"];//print("newscount "+newscount)
- if (newscount>maxnews){
- var lastvalidtimers= tx.executeSql('SELECT DISTINCT created_at FROM news ORDER BY created_at ASC LIMIT ' +(newscount-maxnews));
- var lastvalidtime=lastvalidtimers.rows.item(newscount-maxnews-1).created_at;
- var deleters = tx.executeSql('DELETE from news WHERE created_at<='+lastvalidtime)}
- callback()
- })
- }
-
-function cleanContacts(login,database,callback){
- var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
- db.transaction( function(tx) {
- var oldestnewsrs= tx.executeSql('SELECT created_at FROM news WHERE username="'+login.username+'" AND messagetype=0 ORDER BY created_at ASC LIMIT 1');
- if (oldestnewsrs.rows.length>0){ var oldestnewsTime=oldestnewsrs.rows.item(0).created_at- 604800000;} else{var oldestnewsTime=0} //contacts can be 7 days old
- //print(login.username+" älteste news: "+ oldestnewsTime);
- var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge<'+oldestnewsTime); // check for friends
- //print ("Contact result length: "+ result.rows.length)
- for (var i=0;i-1){contacttimer.start()}
- }
-
-}
-
-
-function cleanUser(user){
- user.created_at=Date.parse(Newsjs.cleanDate(user.created_at));
- var imagehelper1=user.profile_image_url.split("?");
- var imagehelper2=imagehelper1[0].substring(imagehelper1[0].lastIndexOf("/")+1,imagehelper1[0].length);
- var imagehelper3=login.imagestore+"contacts/"+user.screen_name+"-"+imagehelper2
- if(filesystem.fileexist(imagehelper3)){user.profile_image=imagehelper3}else {user.profile_image=""}
- return user
-}
-
-function updateView(viewtype){
- //messageSend.state="";
- //newsBusy.running=true;
- //downloadNotice.text="xhr start "+Date.now()
- switch(viewtype){
- case "Conversations":
- Newsjs.getLastNews(login,db,function(lastnews){
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/friends_timeline");
- xhr.clearParams();
- xhr.setParam("since_id",lastnews);
- xhr.setParam("count",50)});
- break;
- case "Timeline":
- var lastnews=Newsjs.getLastNews(login,db,function(lastnews){
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/friends_timeline");
- xhr.clearParams();
- xhr.setParam("since_id",lastnews);
- xhr.setParam("count",50)
- });
- break;
- case "Search":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/search");
- break;
- case "Notifications":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/friendica/notifications");
- xhr.clearParams();
- break;
- case "Direct Messages":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/direct_messages/all");
- xhr.clearParams();
- break;
- case "Public Timeline":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/public_timeline");
- xhr.clearParams();
- break;
- case "Favorites":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/favorites");
- xhr.clearParams();
- break;
- case "Replies":
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/replies");
- xhr.clearParams();
- break;
- default:
- Newsjs.getLastNews(login,db,function(lastnews){
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/friends_timeline");
- xhr.clearParams();
- xhr.setParam("since_id",lastnews);
- xhr.setParam("count",50)
- newstab.newstabstatus="Conversations";
- });
- }
-
- xhr.get();
- if (viewtype==="Conversations"){Newsjs.allchatsfromdb(db,login.username,function(temp){
- newsStack.allchats=temp
- })}
-}
-
-function showGroups(){
- Helperjs.readData(db,"groups",login.username,function(groups){
- var groupitems="";
- for (var i=0;i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-
-var html=[//Smileys
- '\u263A',
- '\u2639',
- '\u263B',
- //Weather
- '\u2600',
- '\u2601',
- '\u263C',
- '\u2614',
- '\u2602',
- '\u2603',
- '\u2604',
- '\u26C4',
- '\u26C5',
- '\u26C8',
- //Leisure
- '\u2615',
- '\u26BD',
- '\u26BE',
- '\u26F1',
- '\u26F2',
- '\u26F3',
- '\u26F4',
- '\u26F5',
- '\u26F7',
- '\u26F8',
- '\u26F9',
- '\u26FA',
- '\u26FD',
- //Hand
- '\u261C',
- '\u261D',
- '\u261E',
- '\u261F',
- '\u2620',
- '\u2622',
- '\u2623',
- //Religion
- '\u2626',
- '\u262A',
- '\u262C',
- '\u262E',
- '\u262F',
- '\u26EA',
- '\u26E9'
-]
-
-var core=[
-{name:'<3',url:
-'qrc:///images/smileys/core/smiley-heart.gif'},
-
-{name:'</3',url:
-'qrc:///images/smileys/core/smiley-brokenheart.gif'},
-
-{name:':-)',url:
-'qrc:///images/smileys/core/smiley-smile.gif'},
-
-{name:';-)',url:
-'qrc:///images/smileys/core/smiley-wink.gif'},
-
-{name:':-(',url:
-'qrc:///images/smileys/core/smiley-frown.gif'},
-
-{name:':-P',url:
-'qrc:///images/smileys/core/smiley-tongue-out.gif'},
-
-{name:':-X',url:
-'qrc:///images/smileys/core/smiley-kiss.gif'},
-
-{name:':-D',url:
-'qrc:///images/smileys/core/smiley-laughing.gif'},
-
-{name:':-O',url:
-'qrc:///images/smileys/core/smiley-surprised.gif'},
-
-{name:'\\o/',url:
-'qrc:///images/smileys/core/smiley-thumbsup.gif'},
-
-{name:'o.O',url:
-'qrc:///images/smileys/core/smiley-Oo.gif'},
-
-{name:":'(",url:
-'qrc:///images/smileys/core/smiley-cry.gif'},
-
-{name:":-!",url:
-'qrc:///images/smileys/core/smiley-foot-in-mouth.gif'},
-
-{name:":-/",url:
-'qrc:///images/smileys/core/smiley-undecided.gif'},
-
-{name:":-[",url:
-'qrc:///images/smileys/core/smiley-embarassed.gif'},
-
-{name:"8-)",url:
-'qrc:///images/smileys/core/smiley-cool.gif'},
-
-{name:':beer',url:
-'qrc:///images/smileys/core/beer_mug.gif'},
-
-{name:':coffee',url:
-'qrc:///images/smileys/core/coffee.gif'},
-
-{name:':facepalm',url:
-'qrc:///images/smileys/core/smiley-facepalm.gif'},
-
-{name:':like',url:
-'qrc:///images/smileys/core/like.gif'},
-
-{name:':dislike',url:
-'qrc:///images/smileys/core/dislike.gif'},
-
-{name:'~friendica',url:
-'qrc:///images/smileys/core/friendica-16.png'},
-
-{name:'red#',url:
-'qrc:///images/smileys/core/rm-16.png'}
-]
-
-
-var addon=[
-{name:':bunnyflowers',url:
-'qrc:///images/smileys/animals/bunnyflowers.gif'},
-
- {name:':chick',url:
-'qrc:///images/smileys/animals/chick.gif'},
-
- {name:':bumblebee',url:
-'qrc:///images/smileys/animals/bee.gif'},
-
- {name:':ladybird',url:
-'qrc:///images/smileys/animals/ladybird.gif'},
-
- {name:':bigspider',url:
-'qrc:///images/smileys/animals/bigspider.gif' },
-
- {name:':cat',url:
-'qrc:///images/smileys/animals/cat.gif'},
-
- {name:':bunny',url:
-'qrc:///images/smileys/animals/bunny.gif' },
-
- {name:':cow',url:
-'qrc:///images/smileys/animals/cow.gif' },
-
- {name:':crab',url:
-'qrc:///images/smileys/animals/crab.gif' },
-
- {name:':dolphin',url:
-'qrc:///images/smileys/animals/dolphin.gif' },
-
- {name:':dragonfly',url:
-'qrc:///images/smileys/animals/dragonfly.gif' },
-
- {name:':frog',url:
-'qrc:///images/smileys/animals/frog.gif'},
-
- {name:':hamster',url:
-'qrc:///images/smileys/animals/hamster.gif' },
-
- {name:':monkey',url:
-'qrc:///images/smileys/animals/monkey.gif' },
-
- {name:':horse',url:
-'qrc:///images/smileys/animals/horse.gif' },
-
- {name:':parrot',url:
-'qrc:///images/smileys/animals/parrot.gif' },
-
- {name:':tux',url:
-'qrc:///images/smileys/animals/tux.gif' },
-
- {name:':snail',url:
-'qrc:///images/smileys/animals/snail.gif' },
-
- {name:':sheep',url:
-'qrc:///images/smileys/animals/sheep.gif' },
-
- {name:':dog',url:
-'qrc:///images/smileys/animals/dog.gif'},
-
- {name:':elephant',url:
-'qrc:///images/smileys/animals/elephant.gif' },
-
- {name:':fish',url:
-'qrc:///images/smileys/animals/fish.gif' },
-
- {name:':giraffe',url:
-'qrc:///images/smileys/animals/giraffe.gif' },
-
- {name:':pig',url:
-'qrc:///images/smileys/animals/pig.gif'},
-
-//Baby
-
- {name:':baby',url:
-'qrc:///images/smileys/babies/baby.gif' },
-
- {name:':babycot',url:
-'qrc:///images/smileys/babies/babycot.gif' },
-
-
- {name:':pregnant',url:
-'qrc:///images/smileys/babies/pregnant.gif' },
-
- {name:':stork',url:
-'qrc:///images/smileys/babies/stork.gif' },
-
-
-//Confused
- {name:':confused',url:
-'qrc:///images/smileys/confused/confused.gif' },
-
- {name:':shrug',url:
-'qrc:///images/smileys/confused/shrug.gif' },
-
- {name:':stupid',url:
-'qrc:///images/smileys/confused/stupid.gif' },
-
- {name:':dazed',url:
-'qrc:///images/smileys/confused/dazed.gif' },
-//Cool 'qrc:///images/smileys
-
- {name:':affro',url:
-'qrc:///images/smileys/cool/affro.gif'},
-
-//Devil/Angel
-
- {name:':angel',url:
-'qrc:///images/smileys/devilangel/angel.gif'},
-
- {name:':cherub',url:
-'qrc:///images/smileys/devilangel/cherub.gif'},
-
- {name:':devilangel',url:
-'qrc:///images/smileys/devilangel/blondedevil.gif' },
- {name:':catdevil',url:
-'qrc:///images/smileys/devilangel/catdevil.gif'},
-
- {name:':devillish',url:
-'qrc:///images/smileys/devilangel/devil.gif'},
-
- {name:':daseesaw',url:
-'qrc:///images/smileys/devilangel/daseesaw.gif'},
-
- {name:':turnevil',url:
-'qrc:///images/smileys/devilangel/turnevil.gif' },
-
- {name:':saint',url:
-'qrc:///images/smileys/devilangel/saint.gif'},
-
- {name:':graveside',url:
-'qrc:///images/smileys/devilangel/graveside.gif'},
-
-//Unpleasent
-
- {name:':toilet',url:
-'qrc:///images/smileys/disgust/toilet.gif'},
-
- {name:':fartinbed',url:
-'qrc:///images/smileys/disgust/fartinbed.gif' },
-
- {name:':fartblush',url:
-'qrc:///images/smileys/disgust/fartblush.gif' },
-
-//Drinks
-
- {name:':tea',url:
-'qrc:///images/smileys/drink/tea.gif' },
-
- {name:':drool',url:
-'qrc:///images/smileys/drool/drool.gif'},
-
-//Sad
-
- {name:':crying',url:
-'qrc:///images/smileys/sad/crying.png'},
-
- {name:':prisoner',url:
-'qrc:///images/smileys/sad/prisoner.gif' },
-
- {name:':sigh',url:
-'qrc:///images/smileys/sad/sigh.gif'},
-
-//Smoking - only one smiley in here, maybe it needs moving elsewhere?
-
- {name:':smoking',url:
-'qrc:///images/smileys/smoking/smoking.gif'},
-
-//Sport
-
- {name:':basketball',url:
-'qrc:///images/smileys/sport/basketball.gif'},
-
- {name:':bowling',url:
-'qrc:///images/smileys/sport/bowling.gif'},
-
- {name:':cycling',url:
-'qrc:///images/smileys/sport/cycling.gif'},
-
- {name:':darts',url:
-'qrc:///images/smileys/sport/darts.gif'},
-
- {name:':fencing',url:
-'qrc:///images/smileys/sport/fencing.gif' },
-
- {name:':juggling',url:
-'qrc:///images/smileys/sport/juggling.gif'},
-
- {name:':skipping',url:
-'qrc:///images/smileys/sport/skipping.gif'},
-
- {name:':archery',url:
-'qrc:///images/smileys/sport/archery.gif'},
-
- {name:':surfing',url:
-'qrc:///images/smileys/sport/surfing.gif' },
-
- {name:':snooker',url:
-'qrc:///images/smileys/sport/snooker.gif' },
-
- {name:':horseriding',url:
-'qrc:///images/smileys/sport/horseriding.gif'},
-
-//Love
-
- {name:':iloveyou',url:
-'qrc:///images/smileys/love/iloveyou.gif'},
-
- {name:':inlove',url:
-'qrc:///images/smileys/love/inlove.gif'},
-
- {name:':~love',url:
-'qrc:///images/smileys/love/love.gif' },
-
- {name:':lovebear',url:
-'qrc:///images/smileys/love/lovebear.gif'},
-
- {name:':lovebed',url:
-'qrc:///images/smileys/love/lovebed.gif' },
-
- {name:':loveheart',url:
-'qrc:///images/smileys/love/loveheart.gif' },
-
-//Tired/Sleep
-
- {name:':countsheep',url:
-'qrc:///images/smileys/tired/countsheep.gif' },
-
- {name:':hammock',url:
-'qrc:///images/smileys/tired/hammock.gif'},
-
- {name:':pillow',url:
-'qrc:///images/smileys/tired/pillow.gif' },
-
- {name:':yawn',url:
-'qrc:///images/smileys/tired/yawn.gif'},
-
-//Fight/Flame/Violent
-
- {name:':2guns',url:
-'qrc:///images/smileys/fight/2guns.gif' },
-
- {name:':alienfight',url:
-'qrc:///images/smileys/fight/alienfight.gif' },
-
- {name:':army',url:
-'qrc:///images/smileys/fight/army.gif'},
-
- {name:':arrowhead',url:
-'qrc:///images/smileys/fight/arrowhead.gif'},
-
- {name:':bfg',url:
-'qrc:///images/smileys/fight/bfg.gif' },
-
- {name:':bowman',url:
-'qrc:///images/smileys/fight/bowman.gif' },
-
- {name:':chainsaw',url:
-'qrc:///images/smileys/fight/chainsaw.gif'},
-
- {name:':crossbow',url:
-'qrc:///images/smileys/fight/crossbow.gif'},
-
- {name:':crusader',url:
-'qrc:///images/smileys/fight/crusader.gif' },
-
- {name:':dead',url:
-'qrc:///images/smileys/fight/dead.gif' },
-
- {name:':hammersplat',url:
-'qrc:///images/smileys/fight/hammersplat.gif' },
-
- {name:':lasergun',url:
-'qrc:///images/smileys/fight/lasergun.gif' },
-
- {name:':machinegun',url:
-'qrc:///images/smileys/fight/machinegun.gif' },
-
- {name:':acid',url:
-'qrc:///images/smileys/fight/acid.gif' },
-
-//Fantasy - monsters and dragons fantasy. The other type of fantasy belongs in adult
-
- {name:':alienmonster',url:
-'qrc:///images/smileys/fantasy/alienmonster.gif' },
-
- {name:':barbarian',url:
-'qrc:///images/smileys/fantasy/barbarian.gif' },
-
- {name:':dinosaur',url:
-'qrc:///images/smileys/fantasy/dinosaur.gif'},
-
- {name:':dragon',url:
-'qrc:///images/smileys/fantasy/dragon.gif'},
-
- {name:':draco',url:
-'qrc:///images/smileys/fantasy/dragonwhelp.gif'},
-
- {name:':ghost',url:
-'qrc:///images/smileys/fantasy/ghost.gif'},
-
- {name:':mummy',url:
-'qrc:///images/smileys/fantasy/mummy.gif'},
-
-//Food
-
- {name:':apple',url:
-'qrc:///images/smileys/food/apple.gif' },
-
- {name:':broccoli',url:
-'qrc:///images/smileys/food/broccoli.gif' },
-
- {name:':cake',url:
-'qrc:///images/smileys/food/cake.gif'},
-
- {name:':carrot',url:
-'qrc:///images/smileys/food/carrot.gif' },
-
- {name:':popcorn',url:
-'qrc:///images/smileys/food/popcorn.gif'},
-
- {name:':tomato',url:
-'qrc:///images/smileys/food/tomato.gif'},
-
- {name:':banana',url:
-'qrc:///images/smileys/food/banana.gif'},
-
- {name:':cooking',url:
-'qrc:///images/smileys/food/cooking.gif'},
-
- {name:':fryegg',url:
-'qrc:///images/smileys/food/fryegg.gif'},
-
- {name:':birthdaycake',url:
-'qrc:///images/smileys/food/birthdaycake.gif'},
-
-//Happy
-
- {name:':cloud9',url:
-'qrc:///images/smileys/happy/cloud9.gif'},
-
- {name:':tearsofjoy',url:
-'qrc:///images/smileys/happy/tearsofjoy.gif' },
-
-//Repsect
-
- {name:':bow',url:
-'qrc:///images/smileys/respect/bow.gif'},
-
- {name:':bravo',url:
-'qrc:///images/smileys/respect/bravo.gif'},
-
- {name:':hailking',url:
-'qrc:///images/smileys/respect/hailking.gif'},
-
- {name:':number1',url:
-'qrc:///images/smileys/respect/number1.gif' },
-
-//Laugh
-
- {name:':hahaha',url:
-'qrc:///images/smileys/laugh/hahaha.gif'},
-
- {name:':loltv',url:
-'qrc:///images/smileys/laugh/loltv.gif' },
-
- {name:':rofl',url:
-'qrc:///images/smileys/laugh/rofl.gif'},
-
-//Music
-
- {name:':drums',url:
-'qrc:///images/smileys/music/drums.gif'},
-
-
- {name:':guitar',url:
-'qrc:///images/smileys/music/guitar.gif'},
-
- {name:':trumpet',url:
-'qrc:///images/smileys/music/trumpet.gif' },
-
-//smileys that used to be in core
-
- {name:':headbang',url:
-'qrc:///images/smileys/oldcore/headbang.gif'},
-
- {name:':beard',url:
-'qrc:///images/smileys/oldcore/beard.png'},
-
- {name:':whitebeard',url:
-'qrc:///images/smileys/oldcore/whitebeard.png'},
-
- {name:':shaka',url:
-'qrc:///images/smileys/oldcore/shaka.gif'},
-
- {name:':\\.../',url:
-'qrc:///images/smileys/oldcore/shaka.gif'},
-
- {name:':\\ooo/',url:
-'qrc:///images/smileys/oldcore/shaka.gif' },
-
- {name:':headdesk',url:
-'qrc:///images/smileys/oldcore/headbang.gif' },
-
-//These two are still in core, so oldcore isn't strictly right, but we don't want too many directories
-
- {name:':-d',url:
-'qrc:///images/smileys/oldcore/laughing.gif'},
-
- {name:':-o',url:
-'qrc:///images/smileys/oldcore/surprised.gif' },
-
-// Regex killers - stick these at the bottom so they appear at the end of the English and
-// at the start of $OtherLanguage.
-
- {name:':cool',url:
-'qrc:///images/smileys/cool/cool.gif' },
-
- {name:':vomit',url:
-'qrc:///images/smileys/disgust/vomit.gif' },
-
- {name:':golf',url:
-'qrc:///images/smileys/sport/golf.gif' },
-
- {name:':football',url:
-'qrc:///images/smileys/sport/football.gif'},
-
- {name:':tennis',url:
-'qrc:///images/smileys/sport/tennis.gif' },
-
- {name:':alpha',url:
-'qrc:///images/smileys/fight/alpha.png' },
-
- {name:':marine',url:
-'qrc:///images/smileys/fight/marine.gif' },
-
- {name:':sabre',url:
-'qrc:///images/smileys/fight/sabre.gif' },
-
- {name:':tank',url:
-'qrc:///images/smileys/fight/tank.gif' },
-
- {name:':viking',url:
-'qrc:///images/smileys/fight/viking.gif' },
-
- {name:':gangs',url:
-'qrc:///images/smileys/fight/gangs.gif' },
-
- {name:':dj',url:
-'qrc:///images/smileys/music/dj.gif'},
-
- {name:':elvis',url:
-'qrc:///images/smileys/music/elvis.gif'},
-
- {name:':violin',url:
-'qrc:///images/smileys/music/violin.gif'},
-]
-
-
-var adult=[
-{
-name:'(o)(o) ',url:
-'qrc:///images/smileys/adult/tits.gif'},
-
-{name:'(.)(.) ',url:
-'qrc:///images/smileys/adult/tits.gif'},
-
-{name:':bong',url:
-'qrc:///images/smileys/adult/bong.gif'},
-
-{name:':sperm',url:
-'qrc:///images/smileys/adult/sperm.gif'},
-
-{name:':drunk',url:
-'qrc:///images/smileys/adult/drunk.gif'},
-
-{name:':finger',url:
-'qrc:///images/smileys/adult/finger.gif'}
-]
diff --git a/source-linux/js/yplayer.html b/source-linux/js/yplayer.html
deleted file mode 100644
index 8222d36..0000000
--- a/source-linux/js/yplayer.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- -1
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source-linux/qml/calendarqml/CalendarDay.qml b/source-linux/qml/calendarqml/CalendarDay.qml
deleted file mode 100644
index cfc1488..0000000
--- a/source-linux/qml/calendarqml/CalendarDay.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-//import QtQuick.Controls 2.4
-
-Item {
- id: calendarDay
- width:7*mm
- height: 7*mm
- property int dateInt:Math.floor((Date.parse(model.date)-(new Date().getTimezoneOffset() * 60 * 1000))/86400000)
- Rectangle {
- id: placeHolder
- color: 'lightblue'; antialiasing: true
- anchors.fill:parent
- }
- Text {
- id:daytext
- anchors.right: parent.right
- anchors.margins: 0.5*mm
- color:(model.month==monthgrid.month)?"black":"grey"
- wrapMode: Text.WrapAnywhere
- text: model.day
- font.bold: model.today
- font.pixelSize: 4*mm
- }
- Rectangle {
- id:eventRect
- color:"black"
- anchors.margins: 0.5*mm
- anchors.bottom: calendarDay.bottom
- width: parent.width-mm
- height: mm
- visible: eventdays.indexOf(dateInt)>-1
- }
- MouseArea {
- anchors.fill: calendarDay
- onClicked: {
- var eventDate=[];
- var idx = eventdays.indexOf(dateInt);
- while (idx != -1) {
- eventDate.push(idx);
- idx = eventdays.indexOf(dateInt,idx + 1)
- }
- var component = Qt.createComponent("qrc:/qml/calendarqml/EventList.qml");
- if (component.status== Component.Ready){
- var eventlist = component.createObject(calendartab,{"daylist": eventDate})}
- }
- }
-}
diff --git a/source-linux/qml/calendarqml/CalendarTab.qml b/source-linux/qml/calendarqml/CalendarTab.qml
deleted file mode 100644
index 10b4e78..0000000
--- a/source-linux/qml/calendarqml/CalendarTab.qml
+++ /dev/null
@@ -1,174 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import QtQml 2.2
-import Qt.labs.calendar 1.0
-//import QtQuick.Controls 1.2 as Oldcontrol
-import QtQuick.Layouts 1.3
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/calendarqml"
-import "qrc:/qml/genericqml"
-
-Rectangle {
- id:calendarrectangle
-// y:1
-// width:root.width-mm
-// height:root.height-5*mm
- anchors.fill: parent
- color: '#fff'
- property date currentTime: new Date()
- property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
- property var events:[]
- property var eventdays:[]
- //onEventdaysChanged: print(JSON.stringify(eventdays))
-
- function showEvents(friend){
- if(friend=="backButton"){Service.eventsfromdb(db,login.username,function(eventArray,dayArray){
- events=eventArray;
- eventdays=dayArray})
- }
- else if (friend!=""){
- calendartab.calendartabstatus=friend.url.substring(friend.url.lastIndexOf("/")+1,friend.url.length)
- Service.newRequestFriendsEvents(login,friend,calendartab,function(eventArray,dayArray){
- events=eventArray;
- eventdays=dayArray})
- }
- else {calendartab.calendartabstatus="Events";
- Service.eventsfromdb(db,login.username,function(eventArray,dayArray){
- events=eventArray;
- eventdays=dayArray;
- calBusy.running=false
- })
- }
- }
-
- BusyIndicator{
- id: calBusy
- anchors.horizontalCenter: calendarView.horizontalCenter
- anchors.top:calendarView.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- running: false
- }
-
-
- MButton{
- id: updateEvents
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right:calendartabstatusButton.left
- anchors.rightMargin:mm
- height: 6*mm
- width: 8*mm
- text:"\uf021"
- onClicked: {
- Service.getEvents(db,login, calendartab,function(){
- showEvents("")
- })}}
-
- MButton{
- id: calendartabstatusButton
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right: parent.right
- anchors.rightMargin:2*mm
- height: 6*mm
- width: Math.max(10*mm,implicitWidth)
- text: calendartab.calendartabstatus=="Events"?qsTr("Events"):calendartabstatus
- Menu {
- id:calendartabmenu
- width: 40*mm
- MenuItem {
- text: qsTr("Own Calendar")
- font.pixelSize: 3*mm
- onTriggered: {
- calendartab.calendartabstatus="Events";
- // calendartabstatusButton.text=qsTr("own Calendar");
- showEvents("")}
- }
- }
- onClicked: {calendartabmenu.popup()}
- }
-
-
- ListView{
- id: calendarView
- x: mm;y:8*mm
- width: parent.width-2*mm; height: parent.height-9*mm
- clip: true
- snapMode: ListView.SnapOneItem
- orientation: ListView.Horizontal
- highlightRangeMode: ListView.StrictlyEnforceRange
- model: CalendarModel {id:calendarModel
- from: new Date()
- to: new Date(new Date().valueOf()+93312000000)
- }
- delegate:
- ColumnLayout{
- width:calendarView.width
- Text{
- font.bold: true
- Layout.fillWidth: true
- horizontalAlignment:Text.AlignHCenter
- text: model.year
- }
- Text{
- text: Qt.locale().standaloneMonthName(model.month)
- Layout.fillWidth: true
- horizontalAlignment:Text.AlignHCenter
- }
- DayOfWeekRow{
- locale: monthgrid.locale
- Layout.fillWidth: true
- font.pixelSize: 3*mm
- }
-
- MonthGrid {
- id: monthgrid
- Layout.fillWidth: true
- month: model.month
- year: model.year
- locale: Qt.locale()
- delegate: CalendarDay{}
- }
- }
- ScrollIndicator.horizontal: ScrollIndicator { }
- }
-
- Component.onCompleted: {
- root.eventSignal.connect(showEvents);
- if (calendartab.calendartabstatus=="Events"){showEvents("")}
- }
- }
diff --git a/source-linux/qml/calendarqml/EventList.qml b/source-linux/qml/calendarqml/EventList.qml
deleted file mode 100644
index 5028ae7..0000000
--- a/source-linux/qml/calendarqml/EventList.qml
+++ /dev/null
@@ -1,117 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:eventList
- z:2
- border.color: "grey"
- width: parent.width-4*mm
- height:parent.height-12*mm
- x:mm
- y:mm
- property var daylist:[]
-
- MButton{
- id:closeButton
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- height: 6*mm
- width: 8*mm
- text: "\uf057"
- onClicked:{eventList.destroy()}
- }
- ListView {
- id: eventlistView
- x: mm
- y:closeButton.height+2*mm
- width: eventList.width-2*mm
- height: eventList.height-closeButton.height-4*mm
- clip: true
- model: eventModel
- delegate: eventItem
- }
-
- ListModel{
- id: eventModel
- }
-
- Component.onCompleted:{
- for (var i=0; i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.4
-
-import "qrc:/js/service.js" as Service
-import "qrc:/js/layout.js" as Layoutjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-Page{
- id:accountPage
- width: root.width
- height: root.height
- property var users:[]
- property var userdata: ({})
-
- function setServericon(server){
- try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",accountPage, function (obj){
- var serverdata = JSON.parse(obj);
- servericon.visible=true;
- servericon.source=serverdata.site.logo})} catch(e){print(e)}
- }
-
- Button{
- id:userButton
- height: 8*mm
- text:qsTr("User")
- font.pixelSize: 3*mm
- x: mm
- y: mm
- width: root.width/2
- onClicked:{
- var useritems="";
- for (var i=0;i-1){
- Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),accountPage)
- }
- }
- }
- }
- Button {
- x: root.width-9*mm; y: 23.5*mm; width:5*mm; height:5*mm
- text: "\uf234"
- font.pixelSize: 3*mm
- onClicked: {
- configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}})
- }
- }
-
- Rectangle{
- color: "light grey"
- x: 4*mm; y: 33.5*mm; width: root.width-6*mm; height: 5*mm;
- TextInput {
- id: password
- anchors.fill: parent
- font.pixelSize:3*mm
- selectByMouse: true
- echoMode: TextInput.PasswordEchoOnEdit
- }
- }
-
- Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;}
- Flickable {
- id: imagestoreFlickable
- x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;
- clip: true
- TextInput {
- id: imagestore
- width: imagestoreFlickable.width
- height: imagestoreFlickable.height
- font.pixelSize:3*mm
- wrapMode: TextEdit.NoWrap
- onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
- }
- }
-
- FileDialog {
- id: imagestoreDialog
- title: "Please choose a directory"
- folder: shortcuts.pictures
- selectFolder: true
- onAccepted: {
- var imagestoreString=imagestoreDialog.folder.toString();
- imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
- imagestore.text=imagestoreString
- }
- }
-
- Button {
- x: root.width-9*mm; y: 43.5*mm; width: 5*mm; height: 5*mm;
- text: "..."
- font.pixelSize: 3*mm
- onClicked:
- {imagestoreDialog.open()}
- }
-
-
-// Slider{ id: maxNews
-// x:19*mm; y: 53.5*mm;width: root.width/2;height:5*mm
-// from: 0;to:2000; stepSize: 100
-// }
-
-
-// Rectangle{color: "light grey"; x: 4*mm; y: 53.5*mm; width: 9*mm; height: 5*mm;
-// TextEdit{id:maxNewsText;
-// anchors.fill: parent
-// font.pixelSize:3*mm
-// verticalAlignment:TextEdit.AlignRight
-// text:maxNews.value
-// focus: true
-// selectByMouse: true
-// }
-// }
-
- Rectangle{
- x: 4*mm; y: 53.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
- color:"light grey"
- Text{
- id: newsTypeField
- anchors.fill: parent
- font.pixelSize:3*mm
- text:"Conversations"
- }
- MouseArea{
- anchors.fill:parent
- onClicked:newstypemenu.popup()
- }
- }
-
- BusyIndicator{
- id: accountBusy
- anchors.horizontalCenter: parent.horizontalCenter
- y: 63.5*mm
- width:10*mm
- height: 10*mm
- running: false
- }
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- Button {
- x: 4*mm; y: 63.5*mm
- height: 8*mm
- text: qsTr("Confirm")
- font.pixelSize: 3*mm
- onClicked:{
- accountBusy.running=true;
- var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestore.text, maxnews:"",interval: "",newsViewType:newsTypeField.text};
- var errormessage="";
- if (servername.text==""){errormessage=qsTr("No server given! ")}
- else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
- else if (password.text=="") {errormessage+=qsTr("No password given! ")}
- else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
- //else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")}
- else {errormessage=""}
- if (errormessage=="") {
- Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){
- accountBusy.running=false;
- var credentials=JSON.parse(obj);
- if (credentials.hasOwnProperty('status')){
- Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root)
- }
- else{
- filesystem.Directory=userconfig.imagestore;
- filesystem.makeDir("contacts");
- filesystem.makeDir("albums");
- Service.storeConfig(db,userconfig);
- Service.readConfig(db,function(userconfig){
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- });
- accountPage.users=storedUsers});
- //reset values
- root.login=userconfig;
- root.news=[];
- },"isActive",0);
-
- //Service.requestProfile(userconfig,db,root,function(nc){root.newContacts=nc});
- Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
- }
- });
-
- }
- else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
- }}
-
-
-
- Button {
- x: parent.width/2+2*mm; y: mm; width: 5*mm; height: 8*mm;
- text: "-"
- font.pixelSize: 3*mm
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
- Service.deleteConfig(db,userconfig,function(){
- filesystem.Directory=imagestore.text+"contacts";
- filesystem.rmDir();
- filesystem.Directory=imagestore.text+"albums";
- filesystem.rmDir();
- servername.text="https://";
- servericon.visible=false;
- servericon.source="";
- username.text="";
- password.text="";
- imagestore.text="";
- //maxNews.value=0;
- newsTypeField.text="Conversations";
- //messageIntervalSlider.value=30;
- userButton.text=qsTr("User");
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- accountPage.users=storedUsers;})
- })
- }}
-
- Button {
- x: parent.width/2+8*mm; y: mm; width: 5*mm; height: 8*mm;
- text: "+"
- font.pixelSize: 3*mm
- onClicked:{
- servername.text="https://"
- servericon.visible=false;
- servericon.source="";
- username.text=""
- password.text=""
- imagestore.text=""
- //maxNews.value=0
- newsTypeField.text="Conversations"
- //messageIntervalSlider.value=30
- userButton.text=qsTr("User")
- }
- }
-
- Button {
- x: parent.width/2+14*mm; y: mm; width: 5*mm; height: 8*mm;
- text: "?"
- font.pixelSize: 3*mm
- onClicked:{
- root.push("qrc:/qml/configqml/InfoBox.qml");
- }
- }
- Button{
- id:closeButton
- height: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
- Menu {
- id:newstypemenu
- MenuItem {
- font.pixelSize: 3*mm
- text: qsTr("Timeline")
- onTriggered: {newsTypeField.text="Timeline"}
- }
- MenuItem {
- font.pixelSize: 3*mm
- text: qsTr("Conversations")
- onTriggered: {newsTypeField.text="Conversations"}
- }
- }
-
- Component.onCompleted: {
- try{Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- accountPage.users=storedUsers;
- Service.readConfig(db,function(obj){
- userButton.text=obj.username;
- servername.text=obj.server;
- accountPage.setServericon(obj.server);
- username.text= obj.username;
- password.text=Qt.atob(obj.password);
- imagestore.text=obj.imagestore;
- //maxNews.value=obj.maxnews;
- newsTypeField.text=obj.newsViewType;
- //messageIntervalSlider.value=obj.timerInterval;
- if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
- },"isActive",0)
- })
-// Service.readGlobaloptions(db,function(go){
-// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-
- }
- catch (e){print(e)
-// Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",accountPage,function(html){
-// print(html);
-// var bpos=html.indexOf("base ");
-// var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
-// servername.text=baseurl
-// })
- }
- }
-}
diff --git a/source-linux/qml/configqml/ConfigPage.qml b/source-linux/qml/configqml/ConfigPage.qml
deleted file mode 100644
index 7593d81..0000000
--- a/source-linux/qml/configqml/ConfigPage.qml
+++ /dev/null
@@ -1,227 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.4
-
-import "qrc:/js/service.js" as Service
-//import "qrc:/js/layout.js" as Layoutjs
-//import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-Page{
- //anchors.fill: parent
- width:root.width
- height:root.height
- //contentHeight: configBackground.height
- //boundsBehavior: Flickable.StopAtBounds
-
-// Rectangle{
-// id:configBackground
-// color: "white"
-// anchors.fill: parent
-// width:parent.width
-// height:Math.max(90*mm,root.height-12*mm)
-// property var users:[]
-// property bool registeredUser: true
-// property var userdata: ({})
-
-// Text {
-// text: qsTr("Image dir.")
-// //text: qsTr("Max. News")
-// font.pixelSize:3*mm
-// x: 4*mm; y: 10*mm
-// }
- Text {
- text: qsTr("Max. News")
- //text: qsTr("News as")
- font.pixelSize:3*mm
- x: 4*mm; y:10*mm
- }
-
-
-// Text {
-// text: qsTr("Show Website")
-// x: 4*mm; y: 40*mm; width: 20*mm
-// }
-
-
-// Rectangle{color: "light grey"; x: 4*mm; y: 13.5*mm; width: root.width-14*mm; height: 5*mm;}
-// Flickable {
-// id: imagestoreFlickable
-// x: 4*mm; y: 13.5*mm; width: root.width-14*mm; height: 5*mm;
-// clip: true
-// TextInput {
-// id: imagestore
-// width: imagestoreFlickable.width
-// height: imagestoreFlickable.height
-// font.pixelSize:3*mm
-// wrapMode: TextEdit.NoWrap
-// onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
-// }
-// }
-
-// FileDialog {
-// id: imagestoreDialog
-// title: "Please choose a directory"
-// folder: shortcuts.pictures
-// selectFolder: true
-// onAccepted: {
-// var imagestoreString=imagestoreDialog.folder.toString();
-// imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
-// imagestore.text=imagestoreString
-// }
-// }
-
-// Button {
-// x: root.width-9*mm; y: 13.5*mm; width: 7*mm; height: 8*mm;
-// text: "..."
-// onClicked:
-// {imagestoreDialog.open()}
-// }
-
-
- Slider{ id: maxNews
- x:19*mm; y: 13.5*mm;width: root.width/2;height:5*mm
- from: 0;to:2000; stepSize: 100
- value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
- }
-
-
- Rectangle{color: "light grey"; x: 4*mm; y: 13.5*mm; width: 9*mm; height: 5*mm;
- radius: 0.5*mm
- TextEdit{id:maxNewsText;
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:maxNews.value
- focus: true
- selectByMouse: true
- onTextChanged: {
- Service.updateglobaloptions(root.db,"max_news",text);
- }
- }
- }
-
- Rectangle{
- x: 4*mm; y:23.5*mm; width: parent.width - 14*mm; height: 5*mm;
- color:"light grey"
- radius: 0.5*mm
- Text{
- anchors.fill: parent
- font.pixelSize:3*mm
- text:qsTr("Sync")
- }
- MouseArea{
- anchors.fill:parent
- onClicked:root.push("qrc:qml/configqml/SyncConfig.qml");
- }
- }
-// Slider{ id: messageIntervalSlider
-// x:22*mm; y: 73.5*mm;width: root.width/2;height:5*mm
-// from: 0;to:120; stepSize: 15
-// }
-// Rectangle{
-// x: 4*mm; y: 73.5*mm; width: 9*mm; height: 5*mm;
-// TextEdit{
-// id: messageIntervalField
-// anchors.fill: parent
-// font.pixelSize:3*mm
-// verticalAlignment:TextEdit.AlignRight
-// text:messageIntervalSlider.value
-// focus: true
-// selectByMouse: true
-// }
-// }
-// Text{x: 14*mm; y: 73.5*mm; width: 5*mm; height: 5*mm;
-// font.pixelSize:3*mm
-// text:qsTr("Min.")
-// }
-
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- MButton {
- anchors.right: closeButton.left; anchors.rightMargin: mm;
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- width: 8*mm; height: 6*mm;
- text: "?"
- font.pixelSize: 3*mm
- onClicked:{
- root.push("qrc:/qml/configqml/InfoBox.qml");
- }
- }
- MButton{
- id:closeButton
- height: 6*mm
- width :8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
-// Menu {
-// id:newstypemenu
-// MenuItem {
-// text: qsTr("Timeline")
-// onTriggered: {newsTypeField.text="Timeline"}
-// }
-// MenuItem {
-// text: qsTr("Conversations")
-// onTriggered: {newsTypeField.text="Conversations"}
-// }
-// }
-
-// Component.onCompleted: {
-// Service.readGlobaloptions(db,function(go){
-// if(go.hasOwnProperty("max_news")){maxNews.value=go.max_news}else{maxNews.value=1000}
-// //if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-// }
-}
diff --git a/source-linux/qml/configqml/ConfigTab.qml b/source-linux/qml/configqml/ConfigTab.qml
deleted file mode 100644
index e13aefd..0000000
--- a/source-linux/qml/configqml/ConfigTab.qml
+++ /dev/null
@@ -1,482 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 1.2
-
-import "qrc:/js/service.js" as Service
-import "qrc:/js/layout.js" as Layoutjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-StackView{
- id: configStack
- anchors.fill:parent
- initialItem: Flickable{
- width:root.width-5*mm
- height:root.height-12*mm
- contentHeight: configBackground.height
- boundsBehavior: Flickable.StopAtBounds
-
- Rectangle{
- id:configBackground
- color: "white"
- width:parent.width
- height:Math.max(90*mm,root.height-12*mm)
- property var users:[]
- property bool registeredUser: true
- property var userdata: ({})
-
- function setServericon(server){
- try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",configBackground, function (obj){
- var serverdata = JSON.parse(obj);
- servericon.visible=true;
- servericon.source=serverdata.site.logo})} catch(e){print(e)}
- }
-
- BlueButton{
- id:userButton
- text:qsTr("User")
- y:mm
- width: root.width/2
- onClicked:{
- var useritems="";
- for (var i=0;i-1){
- Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),configBackground)
- }
- // Helperjs.friendicaWebRequest(servername.text+'/api/users/show?screen_name='+username.text,configBackground,function(obj){
- // var screennametest=JSON.parse(obj);
- // if (screennametest.hasOwnProperty('status')){
- // Helperjs.showMessage(qsTr("Error"),qsTr("Nickname not registered at given server!"),configBackground);
- // configBackground.registeredUser=false;
- // }else{configBackground.registeredUser=true}
- // });
- // }
- }
- }
- }
- BlueButton {
- x: root.width-9*mm; y: 23.5*mm; width:7*mm
- text: "\uf234"
- onClicked: {
- configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}})
- }
- }
-
- Rectangle{
- color: "light grey"
- x: 4*mm; y: 33.5*mm; width: root.width-6*mm; height: 5*mm;
- TextInput {
- id: password
- anchors.fill: parent
- font.pixelSize:3*mm
- selectByMouse: true
- echoMode: TextInput.PasswordEchoOnEdit
- }
- }
-
- Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;}
- Flickable {
- id: imagestoreFlickable
- x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;
- clip: true
- TextInput {
- id: imagestore
- width: imagestoreFlickable.width
- height: imagestoreFlickable.height
- font.pixelSize:3*mm
- wrapMode: TextEdit.NoWrap
- onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
- }
- }
-
- FileDialog {
- id: imagestoreDialog
- title: "Please choose a directory"
- folder: shortcuts.pictures
- selectFolder: true
- onAccepted: {
- var imagestoreString=imagestoreDialog.folder.toString();
- imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
- imagestore.text=imagestoreString
- }
- }
-
- BlueButton {
- x: root.width-9*mm; y: 43.5*mm; width: 7*mm; height: 5*mm;
- text: "..."
- onClicked:
- {imagestoreDialog.open()}
- }
-
-
- Slider{ id: maxNews
- x:19*mm; y: 53.5*mm;width: root.width/2;height:5*mm
- minimumValue: 0;maximumValue:2000; stepSize: 100
- }
-
-
- Rectangle{color: "light grey"; x: 4*mm; y: 53.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{id:maxNewsText;
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:maxNews.value
- focus: true
- selectByMouse: true
- }
- }
-
- Rectangle{
- x: 4*mm; y: 63.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
- color:"light grey"
- Text{
- id: newsTypeField
- anchors.fill: parent
- font.pixelSize:3*mm
- text:"Conversations"
- }
- MouseArea{
- anchors.fill:parent
- onClicked:newstypemenu.popup()
- }
- }
- Slider{ id: messageIntervalSlider
- x:22*mm; y: 73.5*mm;width: root.width/2;height:5*mm
- minimumValue: 0;maximumValue:120; stepSize: 15
- }
- Rectangle{
- x: 4*mm; y: 73.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{
- id: messageIntervalField
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:messageIntervalSlider.value
- focus: true
- selectByMouse: true
- }
- }
- Text{x: 14*mm; y: 73.5*mm; width: 5*mm; height: 5*mm;
- font.pixelSize:3*mm
- text:qsTr("Min.")
- }
-
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- BlueButton {
- x: 4*mm; y: 83.5*mm
- text: qsTr("Confirm")
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestore.text,maxnews:maxNewsText.text,interval: messageIntervalField.text, newsViewType:newsTypeField.text};
- var errormessage="";
- if (servername.text==""){errormessage=qsTr("No server given! ")}
- else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
- else if ((configBackground.registeredUser==false)){errormessage+=qsTr("Nickname not registered at given server! ")}
- else if (password.text=="") {errormessage+=qsTr("No password given! ")}
- else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
- else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")}
- else {errormessage=""}
- if (errormessage=="") {
- Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){
- var credentials=JSON.parse(obj);
- if (credentials.hasOwnProperty('status')){
- Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root)
- }
- else{
- filesystem.Directory=userconfig.imagestore;
- filesystem.makeDir("contacts");
- filesystem.makeDir("albums");
- Service.storeConfig(db,userconfig);
- Service.readConfig(db,function(userconfig){
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- });
- configBackground.users=storedUsers});
- userButton.color="black"
- //reset values
- root.login=userconfig;
- root.news=[];
- },"isActive",0);
- Service.requestProfile(userconfig,db,root,function(nc){root.newContacts=nc});
- if(osSettings.osType=="Android" && userconfig.timerInterval !=0){
- alarm.setAlarm(userconfig.timerInterval);
- }
- Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
- }
- });
-
- }
- else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
- }}
-
-
-
- BlueButton {
- x: root.width/2+2*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "-"
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
- Service.deleteConfig(db,userconfig,function(){
- filesystem.Directory=imagestore.text+"contacts";
- filesystem.rmDir();
- filesystem.Directory=imagestore.text+"albums";
- filesystem.rmDir();
- configBackground.registeredUser=true;
- servername.text="https://...";
- servericon.visible=false;
- servericon.source="";
- username.text="";
- password.text="";
- imagestore.text="";
- maxNews.value=0;
- newsTypeField.text="Conversations";
- messageIntervalSlider.value=30;
- userButton.text=qsTr("User");
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- configBackground.users=storedUsers;})
- })
- }}
-
- BlueButton {
- x: root.width/2+8*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "+"
- onClicked:{
- configBackground.registeredUser=true;
- servername.text="https://..."
- servericon.visible=false;
- servericon.source="";
- username.text=""
- password.text=""
- imagestore.text=""
- maxNews.value=0
- newsTypeField.text="Conversations"
- messageIntervalSlider.value=30
- userButton.text=qsTr("User")
- }
- }
-
- BlueButton {
- x: root.width/2+14*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "?"
- onClicked:{
- configStack.push({item:"qrc:/qml/configqml/InfoBox.qml"});
- }
- }
-
- Menu {
- id:newstypemenu
- MenuItem {
- text: qsTr("Timeline")
- onTriggered: {newsTypeField.text="Timeline"}
- }
- MenuItem {
- text: qsTr("Conversations")
- onTriggered: {newsTypeField.text="Conversations"}
- }
- }
-
- Component.onCompleted: {
- try{Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- configBackground.users=storedUsers;
- Service.readConfig(db,function(obj){
- userButton.text=obj.username;
- servername.text=obj.server;
- configBackground.setServericon(obj.server);
- username.text= obj.username;
- password.text=Qt.atob(obj.password);
- imagestore.text=obj.imagestore;
- maxNews.value=obj.maxnews;
- newsTypeField.text=obj.newsViewType;
- messageIntervalSlider.value=obj.timerInterval;
- if( obj.isActive==0){userButton.fontColor='black'} else {userButton.fontColor='grey'}},"isActive",0
- )
- })
-// Service.readGlobaloptions(db,function(go){
-// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-
- }
- catch (e){print(e)
- Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",configBackground,function(html){
- var bpos=html.indexOf("baseurl");
- var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
- servername.text=baseurl
- })}
- }
-}
-}
-}
diff --git a/source-linux/qml/configqml/SyncConfig.qml b/source-linux/qml/configqml/SyncConfig.qml
deleted file mode 100644
index 9f42fe8..0000000
--- a/source-linux/qml/configqml/SyncConfig.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import "qrc:/qml/configqml"
-import "qrc:/js/service.js" as Service
-
-Rectangle{
- color:"white"
- width:root.width
- height:root.height
- Text {
- text: qsTr("Sync Interval (0=None)")
- font.pixelSize:3*mm
- //visible: false
- x: 4*mm; y: 10*mm; //width:35*mm;wrapMode: Text.Wrap
- }
-
- Slider{ id: messageIntervalSlider
- x:22*mm; y: 13.5*mm;width: root.width/2;height:5*mm
- value: globaloptions.syncinterval
- from: 0;to:120; stepSize: 15
- }
- Rectangle{
- x: 4*mm; y: 13.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{
- id: messageIntervalField
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:messageIntervalSlider.value
- focus: true
- selectByMouse: true
- onTextChanged: {
- Service.updateglobaloptions(root.db,"syncinterval",text);
- if(osSettings.osType=="Android" && text !=0){
- alarm.setAlarm(text);
- } else if(osSettings.osType=="Linux" && text !=0){
-
- }
- }
- }
- }
- Text{x: 14*mm; y: 13.5*mm; width: 5*mm; height: 5*mm;
- font.pixelSize:3*mm
- text:qsTr("Min.")
- }
-
- Column{
- y:22*mm
- width: parent.width
- spacing:mm
- //anchors.fill: parent
- SyncComponent{adapter:"Timeline"}
- SyncComponent{adapter:"Replies"}
- SyncComponent{ adapter:"DirectMessages"}
- SyncComponent{ adapter:"Notifications"}
- }
-
- Button{
- id:closeButton
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- height: 6*mm
- width: 8*mm
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{root.pop()}
- }
-}
diff --git a/source-linux/qml/contactqml/ContactComponent.qml b/source-linux/qml/contactqml/ContactComponent.qml
deleted file mode 100644
index 3ddcb19..0000000
--- a/source-linux/qml/contactqml/ContactComponent.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/qml/genericqml"
-
-Item {
- id: contactComponent
- height: 8*mm
- width: parent.width
- property var createdAtDate: new Date(contact.created_at)
- property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend==1)?"":( ""+qsTr("Connect")+" ")
-
- Rectangle {
- id: wrapper
- width:parent.width
- height: 8*mm
- border.color: "grey"
- color:"white"
- Image {
- id: photoImage
- x:0.5*mm
- y:0.5*mm
- width: 7*mm
- height:7*mm
- source:((contact.profile_image!="") && (typeof(contact.profile_image)=="string"))? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: {if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}}
- }
-
- Column{
- width: wrapper.width-8*mm
- anchors.left: photoImage.right
- anchors.margins: 1*mm
- spacing: mm
- Label {
- id: namelabel
- width: wrapper.width-4
- height: 3*mm
- text: contact.name
- elide:Text.ElideRight
- color: "#303030"
- font.pixelSize: 3*mm
- }
- Label {
- id: screennamelabel
- width: wrapper.width-8*mm
- height: 2.5*mm
- text: "@"+contact.screen_name
- elide:Text.ElideRight
- color: "#303030"
- font.pixelSize: 2.5*mm
- }
- }
- MouseArea{
- anchors.fill: parent
- onClicked:{
- rootstack.currentIndex=0;
- bar.currentIndex=0;
- root.contactdetailsSignal(contact)
- }
- }
- }
-}
diff --git a/source-linux/qml/contactqml/ContactDetailsComponent.qml b/source-linux/qml/contactqml/ContactDetailsComponent.qml
deleted file mode 100644
index cd5112c..0000000
--- a/source-linux/qml/contactqml/ContactDetailsComponent.qml
+++ /dev/null
@@ -1,176 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/qml/genericqml"
-
-Item {
-id: contactLargeComponent
-x:mm
-y:mm
-property var contact:({})
-property var createdAtDate: new Date(contact.created_at)
-property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+" ")
-
-Rectangle {
- id: wrapper
-
- width:root.width-2*mm //friendsTabView.width;
- height:root.height-20*mm// friendsTabView.height-15*mm
- border.color: "grey"
- color:"white"
- Image {
- id: photoImage
- x:mm
- y:mm
- width: 15*mm
- height:15*mm
- source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
-
- Label {
- id: namelabel
- x: mm
- width: root.width-6*mm //friendsTabView.width-4*mm
- height: 3*mm
- text:contact.name+" (@"+contact.screen_name+")"
- elide:Text.ElideRight
- anchors.topMargin: 0
- anchors.left: photoImage.left
- color: "#303030"
- font.pixelSize: 4*mm
- anchors.top: photoImage.bottom
- }
-Rectangle{
- id: detailsrectangle
- anchors.top: namelabel.bottom
- anchors.topMargin: 2*mm
-
- ScrollView{
- horizontalScrollBarPolicy:Qt.ScrollBarAlwaysOff
- //frameVisible: true
- id:namelabelflickable
- width: root.width-10*mm
- height:root.height-50*mm
- x: mm
- clip:true
- Text{
- id:namelabeltext
- width: namelabelflickable.width
- height: implicitHeight
- font.pixelSize: 3*mm
- textFormat:Text.RichText
- wrapMode: Text.Wrap
- text:""+qsTr("Description")+": "+contact.description+" "+qsTr("Location")+": "+contact.location+" "+qsTr("Posts")+": "+contact.statuses_count+
- " "+qsTr("URL")+":"+contact.url+" "+
- connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale())
- onLinkActivated: {
- Qt.openUrlExternally(link)}
- }
- }
-
- Row{
- anchors.top: namelabelflickable.bottom
- anchors.topMargin: 2*mm
- x: mm
- spacing:4
-
- MButton{
- id:photobutton
- height: 6*mm
- width: 8*mm
- text: "\uf03e" // "Photos"
- visible:(contact.network=="dfrn")
- onClicked:{
- fotostab.phototabstatus="Contact";
- root.currentIndex=2;
- fotostab.active=true;
- root.fotoSignal(contact) ;
- contactLargeComponent.destroy();
- }
- }
-
- MButton{
- id:messagebutton
- height: 6*mm
- width: 8*mm
- text: "\uf0e6" //"Messages"
- onClicked:{
- root.currentIndex=0;
- //newstab.active=true;
- root.messageSignal(contact) ;
- contactLargeComponent.destroy();
- }
- }
-
- MButton{
- id:dmbutton
- visible: (contact.following=="true")
- height: 6*mm
- width: 8*mm
- text: "\uf040" //"DM"
- onClicked:{
- root.currentIndex=0;
- root.directmessageSignal(contact.screen_name);
- contactLargeComponent.destroy();
- }
- }
-
-
- Button{
- id:eventbutton
- visible:(contact.network=="dfrn")
- height: 6*mm
- width: 8*mm
- text:"\uf073" //Events
- onClicked:{
- root.currentIndex=3;
- calendartab.active=true;
- calendartab.calendartabstatus="Friend"
- root.eventSignal(contact);
- contactLargeComponent.destroy();
- }
- }
-
- Button{
- id: closeButton
- height: 6*mm
- width: 8*mm
- text: "\uf057" //"close"
- onClicked:{contactLargeComponent.destroy();
- }
- }
- }
- }
-}
-}
diff --git a/source-linux/qml/contactqml/FriendsTab.qml b/source-linux/qml/contactqml/FriendsTab.qml
deleted file mode 100644
index 41741e7..0000000
--- a/source-linux/qml/contactqml/FriendsTab.qml
+++ /dev/null
@@ -1,392 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-//import QtQuick.Controls.Styles 1.4
-import QtQuick.Layouts 1.11
-import QtQuick.LocalStorage 2.0
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/service.js" as Service
-import "qrc:/qml/contactqml"
-import "qrc:/qml/genericqml"
-
-Rectangle {
- y:1
- color: "white"
-
- function showContactdetails(contact){
- var component = Qt.createComponent("qrc:/qml/contactqml/ContactDetailsComponent.qml");
- if(contact.isFriend){
- friendsTabView.currentIndex=1;
- var contactDetails = component.createObject(friendstab,{"contact": contact})
- }
- else{friendsTabView.currentIndex=2;
- var contactDetails = component.createObject(friendstab,{"contact": contact})
- }
- }
-
- function showProfile(callback){
- var profile=({});
- Helperjs.readData(db,"profiles",login.username,function(profileobject){
- var profilearray=[];
- for (var i in profileobject){
- profilearray.push(JSON.parse(Qt.atob(profileobject[i].profiledata)));
- }
- profile.profiles=profilearray;
- });
- Helperjs.readData(db,"contacts",login.username,function(owner){
- profile.friendica_owner=owner[0];
- },"isFriend",2);
- callback(profile)
- }
-
- TabBar {
- id: friendsbar
- width: parent.width
- height: 9*mm
- position:TabBar.Header
- currentIndex: 1
- TabButton {
- text: qsTr("Me")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Friends")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Contacts")
- font.pixelSize: 2*mm
- }
- TabButton {
- text: qsTr("Groups")
- font.pixelSize: 2*mm
- }
- }
- StackLayout{
- id:friendsTabView
- //anchors.fill: parent
- x:mm
- y:10*mm
- width: parent.width-2*mm
- height: parent.height-10*mm
- currentIndex: friendsbar.currentIndex
- signal contactsSignal(var contact)
- signal groupsSignal(var username)
- onCurrentIndexChanged:{
- if (currentIndex==1){
- contactsSignal("")
- }
- else if (currentIndex==2){
- contactsSignal("")
- }
- else if (currentIndex==3){groupsSignal(root.login.username)}
- }
-// style: TabViewStyle {
-// frameOverlap: 1
-// tab: Rectangle {
-// color: "white"
-// implicitWidth: root.width/4-2*mm
-// implicitHeight: 4*mm
-// Text { id: text
-// anchors.centerIn: parent
-// text: styleData.title
-// color: "dark grey"
-// font.pixelSize:2.5*mm
-// font.bold: styleData.selected
-// }
-// }
-// frame: Rectangle { color: "light grey" }
-// tabsAlignment:Qt.AlignHCenter
-// }
-
- Item{
- id:profileGridTab
- Layout.fillWidth:true
- Layout.fillHeight: true
- Component.onCompleted:{
- showProfile(function(profile){
- var component = Qt.createComponent("qrc:/qml/contactqml/ProfileComponent.qml");
- var profilecomp = component.createObject(profileGridTab,{"profile": profile});
- });
- }
- }
-
- Item{
- id: friendsGridTab
- Layout.fillWidth:true
- Layout.fillHeight: true
- property int currentContact: 0
- function showFriends(contact){
- try {friendsModel.clear()} catch(e){print(e)};
- Helperjs.readData(root.db,"contacts",login.username,function(friendsobject){
- for (var i=0;i1){
- friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid
- }
- friendsModel.append({"contact":friendsobject[i]});
- }
- },"isFriend",1,"screen_name ASC");
- }
- Connections{
- target:xhr
- onDownloaded:{
- if(type=="contactlist"){
- //print(url+" "+filename+" "+i)
- friendsGridTab.currentContact=i+1;
- if(friendsGridTab.currentContact==root.newContacts.length){
- friendsGridTab.showFriends(root.login.username)
- }
- }
- }
- }
- MButton {
- id: updateFriendsButton
- text: "\uf021"
- anchors.top: parent.top
- anchors.topMargin: mm
- anchors.right: parent.right
- height: 6*mm
- width: 8*mm
- onClicked: {
- try {friendsModel.clear()} catch(e){print(e)};
- //root.contactLoadType="friends";
- Newsjs.requestFriends(root.login,db,root,function(nc){
- root.newContacts=nc
- })
- }
- }
-
- ProgressBar{
- id: newContactsProgress
- width: 15*mm
- height: updateFriendsButton.height
- anchors.top: parent.top
- anchors.right:updateFriendsButton.left
- anchors.rightMargin:mm
- visible: (friendsGridTab.currentContact!=(root.newContacts.length))?true:false
- value: friendsGridTab.currentContact/root.newContacts.length
- }
-
- //GridView {
- ListView{
- id: friendsView
- x:mm
- y:updateFriendsButton.height+2*mm
- width:friendsGridTab.width-2*mm
- height:friendsGridTab.height-updateFriendsButton.height-2*mm
- clip: true
- spacing: 2
- //add: Transition {
- // NumberAnimation { properties: "x,y"; from: 300; duration: 1000 }
- // }
- model: friendsModel
- delegate: ContactComponent { }
- }
-
- ListModel{id:friendsModel}
-
- Component.onCompleted: {
- root.friendsSignal.connect(showFriends);
- friendsTabView.contactsSignal.connect(showFriends);
- showFriends(root.login.username);
- root.newContacts=[]
- }
- }
-
- Item{
- id: contactsGridTab
- Layout.fillWidth:true
- Layout.fillHeight: true
- function showContacts(contact){
- try {contactsModel.clear()} catch(e){print(e)};
- Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){
- for (var j=0;j
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/qml/genericqml"
-
-Item {
- id: groupComponent
- property var groupmembers:[]
- //property bool newGroup: false
- function groupModelAppend(groupcontacts,callback){
- for (var n in groupcontacts){
- groupModel.append({"groupmember":groupcontacts[n]});}
- callback()
- }
-
- Rectangle {
- id: wrapper
- width: 16*mm
- height: 15*mm
- border.color: "grey"
- color:"white"
-
- Image {
- id: photoImage
- x:1
- y:1
- width: 10*mm
- height:10*mm
- source:"qrc:/images/defaultcontact.jpg"
- }
- Rectangle{
- id:namelabelRect
- x: 1
- width: wrapper.width-2
- height: 3.5*mm
- anchors.top: photoImage.bottom
- border.color: "light grey"
- TextInput {
- id: namelabel
- anchors.fill: parent
- readOnly: true
- text: group.new?"":group.groupname
- color: "#303030"
- font.pixelSize: 3*mm
-
- }
- }
-
- MButton{
- id: closeButton
- visible: false
- width: 8*mm
- height: 6*mm
- anchors.left: infobutton.right
- anchors.margins: mm
- anchors.top: parent.top
-
- text: "\uf057"
- font.pixelSize: 3*mm
- onClicked:{groupComponent.state="";
- if (group.new){groupsModel.remove(index)}
- }
- }
-
- MButton{
- id:infobutton
- width: 4*mm
- height: 6*mm
-
- //color:"transparent"
- text:"?"
- font.pixelSize: 3*mm
- anchors.left: photoImage.right
- anchors.leftMargin: mm
- anchors.topMargin: mm
- anchors.top: parent.top
- onClicked:{
- //if(group.new){
- Helperjs.readField("members",root.db,"groups",root.login.username,function(groups){
- try {groupModel.clear()}catch (e){print(e)}
- groupmembers=JSON.parse(groups);
- for (var user in groupmembers){
- Helperjs.readData(root.db,"contacts",root.login.username,function(userdata){
- if (userdata[0]){
- userdata[0].name=Qt.atob(userdata[0].name);
- userdata[0].description=Qt.atob(userdata[0].description)
- groupModel.append({"groupmember":userdata[0]
- })}
- },"id",groupmembers[user])
- } //catch(e){}
- },"groupname",group.groupname);
- //}
- groupComponent.state="large"
- }
- }
-
- Rectangle{
- id: detailsrectangle
- anchors.top: namelabelRect.bottom
- anchors.topMargin: mm
- opacity: 0
-
- Component {
- id:groupMember
- Rectangle{
- width:parent.width
- height:6*mm
- Rectangle{id:memberrectangle
- border.color: "#EEEEEE"
- border.width: 1
- width:parent.width-12*mm
- height:6*mm
- Image {
- id: memberImage
- x:1
- y:1
- width: 5*mm
- height:5*mm
- source:(groupmember.isFriend==1)? "file://"+groupmember.profile_image :groupmember.profile_image_url
- onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
- Text{
- font.pixelSize: 3*mm
- anchors.left: memberImage.right
- anchors.margins: 1*mm
- width:parent.width-1
- text:groupmember.name
- }
- MouseArea{
- anchors.fill: parent
- onClicked:{
-// root.currentIndex=1;
-// friendstab.active=true;
-// root.contactdetailsSignal(groupmember)
- root.currentIndex=0;
- root.contactdetailsSignal(groupmember)
- }
- }
- // BlueButton{
- // anchors.left: memberrectangle.right
- // anchors.margins: 1*mm
- // text: "\uf056"
- // onClicked:{
- // groupModel.remove(index)
- // }
- // }
- }
- }
- }
-
- ListView{
- id: groupListView
- x:1
- //anchors.top: parent.top
- width: root.width-10*mm
- height:groupsView.height - 24*mm
- clip: true
- spacing: 2
- model: groupModel
- delegate: groupMember
- }
-
- ListModel{id: groupModel}
-
- Row{
- anchors.top: groupListView.bottom
- anchors.topMargin: mm
- spacing: mm
-
- }
-
-// BlueButton{
-// id: addMembers
-// text:"\uf234"
-// onClicked: {
-// Newsjs.listFriends(root.login,root.db,function(userdata){
-// var newlistcontacts=[];
-// for (var n in userdata){
-// if (groupmembers.indexOf(userdata[n].id)==-1){
-// newlistcontacts.push(userdata[n])
-// }
-// }
-// var component = Qt.createComponent("qrc:/qml/contactqml/Contactlist.qml");
-// var contactlistobject = component.createObject(groupListView,{"possibleUsers":newlistcontacts});
-
-// })
-// }
-// }
-
-// BlueButton{
-// id: updateButton
-// text: "\uf0ee"
-// onClicked:{
-// var groupobject={};
-// var groupmembers=[];
-// for (var i=0;i
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.5
-import QtQuick.LocalStorage 2.0
-import QtQuick.Window 2.0
-import QtQuick.Controls 2.4
-import QtQuick.Layouts 1.11
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/service.js" as Service
-
-
-StackView{
- id:root
- property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsLinux.qml");return tmp.createObject(root)}
- width: osSettings.appWidth
- height:osSettings.appHeight
- property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
- property var login: Service.readActiveConfig(db)
- property var globaloptions: ({}) //Service.readGlobaloptions(db)
- property var contactlist: []
- property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5
- signal messageSignal(var friend)
- signal fotoSignal(var username, var friend)
- signal directmessageSignal(var friend)
- signal newsSignal(var news)
- signal newstypeSignal(var type)
- signal friendsSignal(var username)
- signal contactdetailsSignal(var contact)
- signal eventSignal(var contact)
- signal uploadSignal(var urls)
- signal sendtextSignal(var intenttext)
- signal changeimage(var method, var type, var id)
- property var news:[]
- property var newContacts:[]
- //property string contactLoadType: ""
- property bool imagePicking: false
-
- onLoginChanged:{
- if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")}
- else{root.push(rootStackItem)
- newstab.newstabstatus=login.newsViewType;
- Newsjs.getCurrentContacts(login,db,function(contacts){
- contactlist=contacts})}
- }
- onNewContactsChanged:{
- if(newContacts.length>0){// download contact images and update db
- var contacturls=[];
- var contactnames=[];
- for (var link in newContacts){
- contacturls.push(newContacts[link].profile_image_url);
- contactnames.push(newContacts[link].screen_name);
- Service.updateContactInDB(login,db,newContacts[link].isFriend,newContacts[link])
- contactlist.push(newContacts[link].url);
- }
- xhr.setDownloadtype("contactlist");
- xhr.setFilelist(contacturls);
- xhr.setContactlist(contactnames);
- xhr.setImagedir(login.imagestore);
- xhr.getlist();
- }
-
- }
-
- Connections{
- target:xhr
- onDownloaded:{
- if(type=="contactlist"){
- var database=LocalStorage.openDatabaseSync(root.db[0],root.db[1],root.db[2],root.db[3]);
- var result;
- database.transaction( function(tx) {
- result = tx.executeSql('UPDATE contacts SET profile_image="'+filename+'" where profile_image_url="'+url+'"');
- })
- }
- }
- }
-
- FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
-
- Keys.onReleased: {
- if (event.key === osSettings.backKey) {
- if (currentIndex==0){
- newstab.active=true;
- if (newstab.newstabstatus!=login.newsViewType){
- newstab.newstabstatus=login.newsViewType;
- if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
- newsSignal(dbnews)
- })}
- else{
- Newsjs.chatsfromdb(db,login.username,function(dbnews){
- newsSignal(dbnews)
- })}
- }
- else if (newstab.conversation.length>0){newstab.conversation=[]}
- else{Service.cleanNews(root.db,function(){
- Service.cleanContacts(root.login,root.db,function(){
- Qt.quit()})
- })}
- }
- else if (currentIndex==2){fotoSignal("backButton")}
- else {currentIndex=0}
- event.accepted = true
- }}
-
- Drawer{
- id: leftDrawer
- width: 0.66* root.width
- height: root.height
- edge: Qt.LeftEdge
- position: 1.0
- Column{
- x:mm
- width:parent.width-mm
- Label{
- text: login.hasOwnProperty("username")?login.username:""
- font.pixelSize: 4*mm
- width: parent.width
- height: 6*mm
- }
-// Label{
-// text:login.hasOwnProperty("server")?"@"+login.server:""
-// font.pixelSize: 5*mm
-// width: parent.width
-// }
-
- Label{
- text: "\uf021 " + qsTr("Refresh")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("refresh")
-// updatenews.setDatabase();
-// updatenews.login();
-// updatenews.startsync();
- }
- }
- }
-
-
- Label{
- text: "\uf1da " + qsTr("Timeline")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("timeline")
- }
- }
- }
-
- Label{
- text: "\uf086 " + qsTr("Conversations")
- width: parent.width
- font.pixelSize: 4*mm
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("conversation")
- }
- }
- }
-
- Label{
- text: "\uf005 " + qsTr("Favorites")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("favorites")
- }
- }
- }
- Label{
- text: "\uf0ec " + qsTr("Replies")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("replies")
- }
- }
- }
-
-
- Label{
- text: "\uf0ac " + qsTr("Public Timeline")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("publictimeline")
- }
- }
- }
-
- Label{
- text: "\uf0c0 " + qsTr("Group news")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("groupnews")
- }
- }
- }
-
- Label{
- text: "\uf002 " + qsTr("Search")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- leftDrawer.close();
- newstypeSignal("search")
- }
- }
- }
-
- Label{
- text: "\uf085 "+ qsTr("Settings")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked: {root.push("qrc:qml/configqml/ConfigPage.qml");
- leftDrawer.close()
- }
- }
- }
- Label{
- text: "\uf2bb " + qsTr("Accounts")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked: {root.push("qrc:qml/configqml/AccountPage.qml");
- leftDrawer.close()
- }
- }
- }
-
- Label{
-
- text: "\uf08b " +qsTr("Quit")
- font.pixelSize: 4*mm
- width: parent.width
- MouseArea{
- anchors.fill: parent
- onClicked:{
- Service.cleanNews(root.db,function(){
- Service.cleanContacts(root.login,root.db,function(){
- Qt.quit()})
- })
- }
- }
- }
-
- }
- }
-
-
-
-
- Item{
- id:rootStackItem
- //anchors.fill:parent
- states: State {
- name: "fullscreen";
- PropertyChanges { target: bar; height:0 }
- PropertyChanges { target: rootstack; height:parent.height }
- }
-
- transitions: Transition {
- PropertyAnimation { properties: "height";
- easing.type: Easing.InOutQuad
- duration: 1000
- }
- }
- TabBar {
- id: bar
- width: parent.width
- height: 7*mm
- position:TabBar.Footer
- anchors.top: rootstack.bottom
- onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex
- TabButton {
- text: "\uf03a"
- font.pixelSize: 3*mm
- height: 6*mm
- }
- TabButton {
- text: "\uf0c0"
- font.pixelSize: 3*mm
- height: 6*mm
- }
- TabButton {
- text: "\uf03e"
- font.pixelSize: 3*mm
- height: 6*mm
- }
-
- TabButton {
- text: "\uf073"
- font.pixelSize: 3*mm
- height: 6*mm
- }
- }
-
- StackLayout{
- id:rootstack
- width:parent.width
- height: parent.height-7*mm
- currentIndex:bar.currentIndex
-
-
- Loader{
- id: newstab
- Layout.fillWidth:true
- Layout.fillHeight: true
- property string newstabstatus
- property var conversation:[]
- property var contactposts:[]
- source:(rootstack.currentIndex==0)? "qrc:/qml/newsqml/NewsTab.qml":""
- }
- Loader{
- id: friendstab
- Layout.fillWidth:true
- Layout.fillHeight: true
- source: (rootstack.currentIndex==1)?"qrc:/qml/contactqml/FriendsTab.qml":""
- }
- Loader{
- id: fotostab
- property string phototabstatus:"Images"
- Layout.fillWidth:true
- Layout.fillHeight: true
- source: (rootstack.currentIndex==2)?"qrc:/qml/photoqml/PhotoTab.qml":""
- }
- Loader{
- id: calendartab
- property string calendartabstatus:"Events"
- Layout.fillWidth:true
- Layout.fillHeight: true
- source: (rootstack.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":""
- }
-
- }
- Component.onCompleted: {
- Service.readGlobaloptions(db,function(go){globaloptions=go})
- //print(xhr.networktype());
- if(osSettings.osType=="Android"){
- var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
- var IntentReceiverQml = component.createObject(root);
- } else if (osSettings.osType=="Linux"){
- var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
- var LinuxSyncQml = component.createObject(root);
- }
- }
-}
-}
diff --git a/source-linux/qml/genericqml/ImagePicker.qml b/source-linux/qml/genericqml/ImagePicker.qml
deleted file mode 100644
index d414c1f..0000000
--- a/source-linux/qml/genericqml/ImagePicker.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-import QtQuick 2.0
-import AndroidNative 1.0
-
-Item {
-
- /// Set it to true if multiple images should be picked.
- property bool multiple: false
-
- /// If it is true, it will broadcast the taked photo to other application (e.g Let it show in Google Photos)
- property bool broadcast: true
-
- /// The URL of the image chosen. If multiple images are picked, it will be equal to the first image.
- property string imageUrl: ""
-
- /// A list of images chosen
- property var imageUrls: []
-
- /// It is emitted whatever photo(s) are picked/taken.
- signal ready();
-
- function pickImage() {
- SystemDispatcher.dispatch(m_PICK_IMAGE_MESSAGE,{ multiple: multiple});
- }
-
- function takePhoto() {
- SystemDispatcher.dispatch(m_TAKE_PHOTO_MESSAGE,{
- broadcast: broadcast
- })
- }
-
- property string m_PICK_IMAGE_MESSAGE: "androidnative.ImagePicker.pickImage";
-
- property string m_TAKE_PHOTO_MESSAGE: "androidnative.ImagePicker.takePhoto";
-
- property string m_CHOSEN_MESSAGE: "androidnative.ImagePicker.chosen";
-
-
- Connections {
- target: SystemDispatcher
- onDispatched: {
- if ((type === m_CHOSEN_MESSAGE) && (root.imagePicking==true)) {
- var h=[];
- for (var n in message.imageUrls){
- h.push("file://"+ decodeURIComponent(message.imageUrls[n]).substring(5))
- }
- imageUrls=h;
- imageUrl=h[0];
- ready();
- root.imagePicking=false
- }
- }
- }
-
- Component.onCompleted: {
- SystemDispatcher.loadClass("androidnative.ImagePicker");
- }
-}
-
diff --git a/source-linux/qml/genericqml/ImagePickerLinux.qml b/source-linux/qml/genericqml/ImagePickerLinux.qml
deleted file mode 100644
index cd3b182..0000000
--- a/source-linux/qml/genericqml/ImagePickerLinux.qml
+++ /dev/null
@@ -1,187 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import Qt.labs.folderlistmodel 2.1
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:imageDialog
- z:2
- border.color: "grey"
- width: parent.width-4*mm
- height:parent.height-12*mm
- x:2*mm
- y:10*mm
- property string directory: ""
- property bool multiple: false
- property string imageUrl: ""
- property var imageUrls: []
- signal ready();
- function pickImage() {}
-
- Text{
- id:directoryText
- x:0.5*mm
- y:0.5*mm
- width: imageDialog.width-15*mm
- height:contentHeight
- wrapMode: Text.Wrap
- text: directory
- }
- Button{
- id:closeButton
- height: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 0.5*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- onClicked:{ready();imageDialog.destroy()}
- }
-
- ListView {
- id: imageView
- x:0.5*mm
- y: Math.max(directoryText.height, closeButton.height)+mm
- width: imageDialog.width-2*mm
- height: imageDialog.height-imageView.y-4*mm
- clip: true
- model: imageModel
- delegate: imageItem
- }
-
- FolderListModel{
- id: imageModel
- nameFilters: ["*.png", "*.jpg",".jpeg","*.JPG","*.gif"]
- sortField: FolderListModel.Time
- sortReversed:false
- showDotAndDotDot: true
- showDirs: true
- showDirsFirst: true
- folder:directory
- }
-
- BusyIndicator{
- id: imageBusy
- anchors.horizontalCenter: imageView.horizontalCenter
- anchors.top:imageView.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- running:false
- }
-
- Component{
- id:imageItem
- Item{
- width:imageView.width
- height:folderImage.height+2*mm
- Rectangle{
- id:imagetextRectangle
- color:"black"
- x:mm
- z:3
- opacity: fileIsDir?0:0.5
- width:imagetext.contentWidth
- height: imagetext.contentHeight
- anchors.bottom: folderImage.bottom
- }
- Text {
- id:imagetext
- x:fileIsDir?11*mm:mm
- z:4
- text: fileName
- width: fileIsDir?parent.width - 12*mm :imageView.width-mm
- anchors.bottom: folderImage.bottom
- color: fileIsDir?"black":"white"
- font.pixelSize: 3*mm
- wrapMode:Text.Wrap
- }
- Text {
- id:selected
- anchors.right:parent.right
- visible: attachImageURLs.indexOf(fileURL)>-1
- z:4
- text: "\u2713"
- width: 10*mm
- anchors.top: folderImage.top
- color: "green"
- font.pixelSize: 10*mm
- }
-
- Image{id:folderImage
- width: fileIsDir?10*mm: imageView.width-mm
- fillMode:Image.PreserveAspectFit
- source:fileIsDir?"qrc:/images/folder-blue.png":fileURL
- }
-
- MouseArea{
- anchors.fill: parent
- onClicked:{
- if (fileName==".."){
- imageModel.folder=imageModel.parentFolder;
- directory=imageModel.parentFolder
- }
- else if (fileIsDir){
- imageModel.folder=fileURL;
- directory=fileURL
- }
- else{
- if (multiple!=true){
- //attachImageURLs.push(fileURL);
- //attachImage(fileURL);
- imageUrls.push(fileURL);
- imageUrl=fileURL;
- ready();
- imageDialog.destroy()
- }
- else {
- if(selected.visible==true){
- imageUrls.splice(imageUrls.indexOf(fileURL,1))
- selected.visible=false
- }
- else{
- imageUrls.push(fileURL);
- selected.visible=true;
-
- }
- imageUrl=fileURL
- }
- }
- }
- }
- }
- }
-}
diff --git a/source-linux/qml/genericqml/LinuxSync.qml b/source-linux/qml/genericqml/LinuxSync.qml
deleted file mode 100644
index 0e6d84d..0000000
--- a/source-linux/qml/genericqml/LinuxSync.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-import QtQuick 2.4
-
-
-Item {
- Timer{
- id:syncTimer
- repeat: true
- onTriggered: {
- updatenews.setDatabase();
- updatenews.login();
- updatenews.startsync();
- }
- }
-
- Component.onCompleted: {
- if (root.globaloptions.hasOwnProperty("syncinterval") && root.globaloptions.syncinterval !=null && root.globaloptions.syncinterval !=0){
- syncTimer.interval=root.globaloptions.syncinterval*60000;
- syncTimer.start()
- }
- }
-}
-
diff --git a/source-linux/qml/genericqml/PermissionDialog.qml b/source-linux/qml/genericqml/PermissionDialog.qml
deleted file mode 100644
index 8faaad8..0000000
--- a/source-linux/qml/genericqml/PermissionDialog.qml
+++ /dev/null
@@ -1,220 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import "qrc:/js/service.js" as Service
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle{
- id:permissionDialog
-// x: mm
- width: parent.width-5*mm
- height:root.height/3
- function updatePerms(){
- for (var i=0;i-1){contactstatus="positive"}
- else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"}
- contactModel.append({"contact":contacts[name],"contactstatus":contactstatus})
- }},"isFriend",1);
-
- Helperjs.readData(db,"groups",login.username,function(owngroups){
- for (var number in owngroups){
- var groupstatus= "neutral";
- if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"}
- else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"}
- groupModel.append({"group":owngroups[number],"groupstatus":groupstatus})
- }});
- }
-}
diff --git a/source-linux/qml/genericqml/Search.qml b/source-linux/qml/genericqml/Search.qml
deleted file mode 100644
index 835e7be..0000000
--- a/source-linux/qml/genericqml/Search.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-// This file is part of Friendiqa
-// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Controls 1.2
-import "qrc:/qml/genericqml"
-//import "qrc:/js/news.js" as Newsjs
-//import "qrc:/js/helper.js" as Helperjs
-//import "qrc:/js/service.js" as Service
-
-
-Rectangle {
- id:searchComponent
- //onActiveFocusChanged: searchText.forceActiveFocus()
- //onVisibleChanged: if (visible) searchText.forceActiveFocus()
-// border.color: "#EEEEEE"
-// border.width: 1
- color:"lightgrey"
-// width:conversationView.width
-// height:Math.max(replyText.contentHeight+2*mm,6*mm)
- Rectangle{
- color: "white"
- radius:0.5*mm
- anchors.left: parent.left
- anchors.leftMargin:mm
- anchors.top:parent.top
- anchors.topMargin: 0.5*mm
- width:parent.width-2*mm
- height: 4*mm //Math.max( searchText.contentHeight,5*mm)
-
- TextInput {
- id: searchText
- focus: true
- font.pixelSize: 3*mm
- wrapMode: Text.Wrap
- anchors.fill: parent
- selectByMouse: true
- cursorVisible: false
- onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()}
- //onHeightChanged: newsView.contentY+=4.5*mm
-
- }
- Component.onCompleted: searchText.forceActiveFocus()
-// BlueButton {
-// id: sendButton
-// text: "\uf002"
-// anchors.left: parent.right
-// anchors.leftMargin:mm
-// anchors.top:parent.top
-// //anchors.topMargin: 0.5*mm
-// color:"white"
-// onClicked: {
-// var body=searchText.getText(0,searchText.length);
-// search(body)
-// }
-// }
- }
-
-}
diff --git a/source-linux/qml/newsqml/ContactPage.qml b/source-linux/qml/newsqml/ContactPage.qml
deleted file mode 100644
index e3c7ead..0000000
--- a/source-linux/qml/newsqml/ContactPage.qml
+++ /dev/null
@@ -1,217 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle {
- id:contactList
- color: "white"
- property var contact:({})
- property string profileimagesource:contact.profile_image
- ListView {
- id: contactView
- x:mm
- y:9*mm
- width: contactList.width-4*mm
- height:contactList.height-10*mm
- clip: true
- spacing: 0
- header: contactHeader
- model: contactModel
- delegate: Newsitem{}
- }
- BusyIndicator{
- id: contactBusy
- anchors.centerIn:parent
- width:10*mm
- height: 10*mm
- running: true
- }
-
- Component { id: contactHeader
- Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- color:"white"
- width:contactView.width
- height: profileImage.height+namelabel.height+detailtext.height+7*mm
- //height: wrapper.height
- property var createdAtDate: new Date(contact.created_at)
- property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+" ")
-
- Image {
- id: profileImage
- x:mm
- y:mm
- width: contactView.width/2
- height:width
- source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- Connections{
- target:contactList
- onProfileimagesourceChanged:profileImage.source=profileimagesource
- }
- }
- Column{id:buttoncolumn
- anchors.right: parent.right
- anchors.rightMargin: mm
- y: mm
- spacing:4
-
- MButton{
- id:photobutton
- height: 6*mm
- width: 8*mm
- text: "\uf03e" // "Photos"
- //font.pixelSize: 3*mm
- visible:(contact.network=="dfrn")
- onClicked:{
- rootstack.currentIndex=2;
- bar.currentIndex=2;
- fotostab.phototabstatus="Contact";
-
- //fotostab.active=true;
- fotoSignal(root.login,contact) ;
- newsStack.pop();
- }
- }
-
- MButton{
- id:dmbutton
- height: 6*mm
- width: 8*mm
- visible: (contact.following=="true")
- text: "\uf040" //"DM"
- //font.pixelSize: 3*mm
- onClicked:{
- rootstack.currentIndex=0;
- newsSwipeview.currentIndex=2;
- directmessageSignal(contact)
- }
- }
-
- MButton{
- id:eventbutton
- visible:(contact.network=="dfrn")
- height: 6*mm
- width: 8*mm
- text:"\uf073"
- //font.pixelSize: 3*mm
- onClicked:{
- rootstack.currentIndex=3;
- bar.currentIndex=3;
- calendartab.calendartabstatus="Friend"
- eventSignal(contact);
- newsStack.pop()
- }
- }
-
- }//Column end
- Label {
- id: namelabel
- x:mm
- width: contactView.width-2*mm
- height: implicitHeight
- text:contact.name+" (@"+contact.screen_name+")"
- wrapMode: Text.Wrap//elide:Text.ElideRight
- color: "#303030"
- font.pixelSize: 4*mm
- anchors.top: profileImage.bottom
- anchors.topMargin: mm
- }
- Text{
- id:detailtext
- anchors.top: namelabel.bottom
- anchors.topMargin: 2*mm
- x:mm
- width: contactView.width-2*mm
- height: implicitHeight
- font.pixelSize: 2.5*mm
- textFormat:Text.RichText
- wrapMode: Text.Wrap
- text:""+qsTr("Description")+": "+contact.description+" "+qsTr("Location")+": "+contact.location+" "+qsTr("Posts")+": "+contact.statuses_count+
- " "+qsTr("URL")+":"+contact.url+" "+
- connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale())
- onLinkActivated: {
- Qt.openUrlExternally(link)}
- }
-
-
- //}
- }
-
- }//Component end
- Connections{
- target:newstab
- onContactpostsChanged:{
- if (newstab.contactposts.length>0){profileimagesource=newstab.contactposts[0].user.profile_image_url_large}
- contactBusy.running=false;
- contactModel.clear();
- var currentTime= new Date();
- var msg = {'currentTime': currentTime, 'model': contactModel,'news':newstab.contactposts, 'options':globaloptions};
- contactWorker.sendMessage(msg)
- }
- }
-
- ListModel{id: contactModel}
-
- WorkerScript {
- id: contactWorker
- source: "qrc:/js/newsworker.js"
- }
-
- MButton {
- id: closeButton
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- //font.pixelSize: 3*mm
- onClicked: {
- newsStack.pop()
- }
- }
- Component.onCompleted: {
- xhr.clearParams();
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/user_timeline");
- xhr.setParam("user_id",contact.id)
- xhr.get();
- }
-}
diff --git a/source-linux/qml/newsqml/Conversation.qml b/source-linux/qml/newsqml/Conversation.qml
deleted file mode 100644
index c3fc24a..0000000
--- a/source-linux/qml/newsqml/Conversation.qml
+++ /dev/null
@@ -1,189 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// ConversationView with button
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-import "qrc:/qml/newsqml"
-
-Rectangle {
- id:conversationList
-// width:root.width-5*mm
-// height:root.height-12*mm
- //property var news
-// y:1
-// z:2
- color: "white"
-// border.color: "grey"
-// width:root.width-5*mm
-// height: conversationView.height+10*mm
-
- ListView {
- id: conversationView
- x:3*mm
- y:8*mm
- width: conversationList.width-4*mm
- //height: contentHeight
- height:conversationList.height-10*mm
- clip: true
- spacing: 0
- footer: MessageSend{conversation:true}//footerReply
- model: conversationModel
- delegate: Newsitem{}
- }
- BusyIndicator{
- id: conversationBusy
- anchors.horizontalCenter: conversationView.horizontalCenter
- anchors.top:conversationList.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- running: true
- }
-
- Connections{
- target:newstab
- onConversationChanged:{
- //if(newsitem.itemindex==newsStack.conversationIndex){
- if(newstab.conversation.length==0){
- newsStack.pop()
- //newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning);
- //conversationList.destroy(); conversationsymbol.color="grey"
- } else { conversationBusy.running=false;
- conversationModel.clear();
- var currentTime= new Date();
- var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'options':globaloptions};
- conversationWorker.sendMessage(msg)
- //conversationsymbol.color="grey"
- }
- //}
- }
- }
-
-// Component { id:footerReply
-// Rectangle{
-// border.color: "#EEEEEE"
-// border.width: 1
-// color:"lightgrey"
-// width:conversationView.width
-// height:Math.max(replyText.contentHeight+2*mm,6*mm)
-// Rectangle{
-// color: "white"
-// radius:0.5*mm
-// anchors.left: parent.left
-// anchors.leftMargin:mm
-// anchors.top:parent.top
-// anchors.topMargin: 0.5*mm
-// width:parent.width-12*mm
-// height:Math.max( replyText.contentHeight,5*mm)
-
-// TextInput {
-// id: replyText
-// font.pixelSize: 3*mm
-// wrapMode: Text.Wrap
-// anchors.fill: parent
-// selectByMouse: true
-// onHeightChanged: conversationView.contentY+=4.5*mm
-// }
-// }
-
-// Button {
-// id: sendButton
-// height: 8*mm
-// width:8*mm
-// text: "\uf1d9"
-// anchors.right: parent.right
-// anchors.rightMargin:mm
-// anchors.top:parent.top
-// anchors.topMargin: 0.5*mm
-// //color:"white"
-// onClicked: { try{
-// var body=replyText.getText(0,replyText.length);
-// newsBusy.running=true;
-// replyText.text=""
-// xhr.clearParams();
-// xhr.setLogin(login.username+":"+Qt.atob(login.password));
-// if (conversationModel.get(0).newsitemobject.messagetype==0){
-
-// //xhr.url= login.server + "/api/statuses/update.json";
-// xhr.setUrl(login.server);
-// xhr.setApi("/api/statuses/update");
-// xhr.setParam("source", "Friendiqa");
-// xhr.setParam("status", body);
-// xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.id)}
-// else {//xhr.url= login.server + "/api/direct_messages/new.json";
-// xhr.setUrl(login.server);
-// xhr.setApi("/api/direct_messages/new");
-// xhr.setParam("text", body);
-// xhr.setParam("screen_name",conversationModel.get(conversationModel.count-1).newsitemobject.screen_name);
-// xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.id)
-// }
-// xhr.post();
-// } catch(e){Helperjs.showMessage("Error",e.toString(),root)}
-// }
-// }
-// }
-// }
-
-
-
- ListModel{id: conversationModel}
-
- WorkerScript {
- id: conversationWorker
- source: "qrc:/js/newsworker.js"
- }
-
- MButton {
- id: closeButton
- height: 6*mm
- width: 8*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- text: "\uf057"
- onClicked: {
- //newsView.positionViewAtIndex(newsStack.conversationIndex,ListView.Beginning);
- newsStack.pop()
- //conversationList.destroy();
- //conversationsymbol.color="grey"
- }
- }
-
-// Component.onCompleted: {
-// if (news){var currentTime= new Date();
-// var msg = {'currentTime': currentTime, 'model': conversationModel,'news':news};
-// conversationWorker.sendMessage(msg)}
-// }
-}
diff --git a/source-linux/qml/newsqml/FriendicaActivities.qml b/source-linux/qml/newsqml/FriendicaActivities.qml
deleted file mode 100644
index 38ffe3b..0000000
--- a/source-linux/qml/newsqml/FriendicaActivities.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// List of people from Friendica Activities
-import QtQuick 2.0
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/genericqml"
-
-Rectangle {
- id:activitiesRectangle
- property var activitymembers
- color: "white"
- border.color: "light grey"
- radius:0.5*mm
- width:root.width/2
- height:Math.min(root.height/2,(10*mm+6*activitymembers.length*mm))
-
- ListView {
- id: contactView
- x:mm
- y:8*mm
- width: activitiesRectangle.width-2*mm
- height: activitiesRectangle.height-10*mm
- clip: true
- spacing: 0
- model: activitiesModel
- delegate: activitiesContact
- }
-
- ListModel{id: activitiesModel}
-
- Component { id:activitiesContact
- Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- radius:0.5*mm
- width:parent.width
- height:6*mm
- Image {
- id: contactImage
- x:1
- y:1
- width: 5*mm
- height:5*mm
- source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: if (contactImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
- }
- Text{
- font.pixelSize: 3*mm
- anchors.left: contactImage.right
- anchors.margins: 1*mm
- text:contact.name
- }
-
- MouseArea{
- anchors.fill: parent
- onClicked:{showContact(contact)}
- }
- }}
-
- BlueButton {
- id: closeButton
- //width:10*mm
- anchors.top: parent.top
- anchors.topMargin: 1*mm
- anchors.right: parent.right
- anchors.rightMargin: 1*mm
- color:"white"
- text: "\uf057"// qsTr("Close")
- onClicked: {
- activitiesRectangle.destroy()
- }
- }
-
- Component.onCompleted: {
- for (var user in activitymembers){
- activitiesModel.append({"contact":activitymembers[user]})
- }
- }
-}
diff --git a/source-linux/qml/newsqml/MessageSend.qml b/source-linux/qml/newsqml/MessageSend.qml
deleted file mode 100644
index 37b46a9..0000000
--- a/source-linux/qml/newsqml/MessageSend.qml
+++ /dev/null
@@ -1,427 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// message.qml
-// message with buttons
-import QtQuick 2.4
-import QtQuick.Controls 2.4
-//import QtQuick.Dialogs 1.2
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/smiley.js" as Smileyjs
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/qml/genericqml"
-
-
-Rectangle{
- color:"#EEEEEE"
- width:parent.width
- height: (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0
- id:messageSend
- visible:(newsSwipeview.stacktype!="Notifications")?true:false
- property string parentId: ""
- //property var parentObject:({})
- property bool conversation: false
- property string reply_to_user:""
- property alias bodyMessage: bodyField.text
- property var attachImageURLs: [];
- //property int directmessage: 0;
- property var contacts: []
- property var groups: []
- property var contact_allow:login.permissions[0]
- property var contact_deny:login.permissions[1]
- property var group_allow:login.permissions[2]
- property var group_deny:login.permissions[3]
-
- onReply_to_userChanged: {
- if (reply_to_user!=""){
- receiverLabel.visible=true
- }
- }
-
- function directmessagePrepare(friend){
- messageSend.state="active";
- reply_to_user=friend.screen_name;
- receiverLabel.text=qsTr("to:")+ " "+ friend.screen_name;
- }
-
-
- function sendUrls(urls){
- if((urls.length==1 && attachImageURLs.length==0)){
- attachImage(urls);
- attachImageURLs.push(urls);
- messageSend.state="active";
- }
- }
-
- function sendtext(text){
- if(text){
- if (text.subject=="undefined"){text.subject=""}
- if(text.plaintext.lastIndexOf(".jpg")>-1 || text.plaintext.lastIndexOf(".jpeg")>-1 || text.plaintext.lastIndexOf(".png")>-1 || text.plaintext.lastIndexOf(".gif")>-1){
- text.plaintext=""}
- bodyField.text=text.subject+"\n"+text.plaintext;
- messageSend.state="active";
- }
- }
-
-
-
- function attachImage(url){
- var imageAttachmentObject=Qt.createQmlObject('import QtQuick 2.0; Image {id:imageAttachment'+attachImageURLs.length+'; source:"'+
- url.toString()+'"; x:2*mm; width: 45*mm; height: 45*mm;fillMode: Image.PreserveAspectFit;MouseArea{anchors.fill:parent;onClicked:{attachImageURLs.splice(attachImageURLs.indexOf("'+
- url+'"),1); imageAttachment'+attachImageURLs.length+'.destroy()}}}',messageColumn,"attachedImage");
- }
-
- function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) {
- //xhr.url= login.server + "/api/statuses/update.json";
- newsBusy.running=true;
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/statuses/update");
- xhr.clearParams();
- xhr.setParam("source", "Friendiqa");
- xhr.setParam("htmlstatus", status);
- if (parentId!="") {xhr.setParam("in_reply_to_status_id", parentId)};
- if (title!=="") {xhr.setParam("title", title)};
- if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
- if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
- if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
- if (contact_deny.length>0) {xhr.setParam("contact_deny", Helperjs.cleanArray(contact_deny))};
- if (attachImageURL.length>0) {for (var image in attachImageURL){xhr.setImageFileParam("media", attachImageURL[image] )}};
- xhr.post();
- }
-
- function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
- newsBusy.running=true;
- //xhr.url= login.server + "/api/direct_messages/new.json";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/direct_messages/new");
- xhr.clearParams();
- xhr.setParam("text", text);
- xhr.setParam("screen_name", screen_name);
- if (parentId!="") {xhr.setParam("replyto", replyto)};
- //if (title!=="") {xhr.setParam("title", title)};
- xhr.post();
- }
-
- function setParent(newsitemobject){
- //print("Newsobject "+newsitemobject.id+ " "+JSON.stringify(newsitemobject.user));
- if (newsitemobject!=""){
- messageSend.state="conversation"
- reply_to_user=newsitemobject.user.screen_name;
- receiverLabel.text=qsTr("to:")+ " "+ newsitemobject.user.screen_name;
- parentId=newsitemobject.id
- } else {
- messageSend.state=""
- reply_to_user="";
- receiverLabel.text=qsTr("to:");
- parentId="";
- bodyField.text="";
- attachImageURLs.pop();
- try{imageAttachment.destroy()}catch(e){}
- }
- }
-
- function contactmenu(letter){
- Newsjs.listFriends(login,db,function(contacts){
- var contactitems="";
- for (var i=0;i1){
- contacts[i].screen_name=contacts[i].screen_name+"+"+contacts[i].cid
- }
- contactitems=contactitems+"MenuItem{text:'"+contacts[i].screen_name+
- "'; onTriggered:{if (newsSwipeview.stacktype=='DirectMessages'){reply_to_user='"+
- contacts[i].screen_name+"'} else {bodyField.insert("+
- bodyField.cursorPosition+",' "+contacts[i].screen_name.substring(1)+" ');bodyField.cursorPosition=bodyField.cursorPosition+"+contacts[i].screen_name.length+"}}}"
- //}
- }
- var menuString="import QtQuick.Controls 2.4; Menu {width:40*mm; font.pixelSize: 3*mm; "+contactitems+"}";
- var contactlistObject=Qt.createQmlObject(menuString,messageColumn,"contactmenuOutput");
- if (contacts.length>0){contactlistObject.popup()}
- },letter);
- }
-// Flickable{
-// anchors.fill: parent
-// contentHeight: messageColumn.height
-// boundsBehavior: Flickable.StopAtBounds
-
- Column {
- y:0.5*mm
- id:messageColumn
- spacing: 0.5*mm
- width: parent.width
- height: 10*mm//implicitHeight
- Label{
- id:receiverLabel
- x: 0.5*mm
- width: parent.width-mm
- font.pixelSize: 3*mm
- text: newsSwipeview.stacktype=="DirectMessages"?qsTr("to:")+ " "+ reply_to_user:""
- visible:false// ((parentId !== "") || (newsStack.parent.stacktype=="DirectMessages"))
- MouseArea{
- anchors.fill: parent
- onClicked:{}
- }
- }
- TextField {
- id: titleField
- x: 0.5*mm
- width: parent.width-mm
- font.pixelSize: 3*mm
- placeholderText: qsTr("Title (optional)")
- visible: false//(parentId === "") && (bodyField.length>1)
- onVisibleChanged: if ((visible==true)&&(conversation==true)){
- conversationView.contentY=conversationView.contentY+titleField.height
- }
- }
-
-
-
- Rectangle{
- color: "white"
- radius: 0.5*mm
- x:mm
- width: parent.width-2*mm
- height:Math.max(bodyField.contentHeight+4*mm,10*mm)
- TextArea {
- id: bodyField
- anchors.fill: parent
- font.pixelSize: 3*mm
- font.family: "Noto Sans"
- wrapMode: Text.Wrap
- selectByMouse: true
- placeholderText: conversation?"": qsTr("What's on your mind?")
- textFormat: TextEdit.RichText //TextEdit.PlainText
- onLineCountChanged: (conversation==true)?conversationView.contentY=conversationView.contentY+3*mm:newsView.contentY=newsView.contentY+3*mm
- onLinkActivated:{Qt.openUrlExternally(link)}
- onActiveFocusChanged:{
- if (activeFocus==true){
- if (conversation==true){
- setParent(conversationModel.get(0).newsitemobject);
- messageSend.state="conversation"
- } else{
- messageSend.state="active"
- }
- }
- }
- onTextChanged:{
- if (text!=""){
- //print(getText(bodyField.cursorPosition-2,bodyField.cursorPosition) +" preedit: "+ preeditText+cursorPosition);
- var regex1 = /@[a-z]/;var regex2 = /![a-z]/;
- //print(text.substring(cursorPosition-2,cursorPosition));
- //if (regex.test(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)) || regex.test(preeditText) || regex.test(text)){
- if (regex1.test(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)+preeditText) || regex2.test(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)+preeditText)){
- var letter=(getText(bodyField.cursorPosition-2,bodyField.cursorPosition)).match(/[a-z]/);
- contactmenu(letter)
- }
- }}
- }
- }
-
-
-// Row{
-// spacing: 2
-// width: parent.width
-// CheckBox{
-// id:dmCheckbox
-// text:"DM"
-// enabled: false
-// checked: (directmessage==1)?true:false
-// onClicked:{
-// if(dmCheckbox.checkedState==Qt.Checked){directmessage=1}
-// else if(dmCheckbox.checkedState==Qt.Unchecked){directmessage=0}
-// }
-// }
-
-// Button{
-// text:"\uf0c1"
-// height:8*mm
-// onClicked: {
-// if(bodyField.selectedText==""){Helperjs.showMessage("Error","No text selected",messageSend)}
-// else{urlTextEdit.text="";
-// urlRectangle.visible=true}}
-// }
-// }
-// Rectangle{
-// id:urlRectangle
-// height: 7*mm //parent.height
-// width:parent.width-2*mm
-// visible:false
-// TextField{
-// id:urlTextEdit
-// width:parent.width-7*mm
-// height:parent.height
-// }
-// Button{
-// anchors.left:urlTextEdit.right
-// anchors.leftMargin:mm
-// height:8*mm
-// text:"\u2713"
-// onClicked: {if(urlTextEdit.text!=""){
-// var start = bodyField.selectionStart;
-// var text=bodyField.selectedText
-// if(text.lastIndexOf(".jpg")>-1 || text.lastIndexOf(".jpeg")>-1 || text.lastIndexOf(".png")>-1){text=""}
-// text = "[url="+urlTextEdit.text+"]" + text + "[/url]";
-// bodyField.remove(start,bodyField.selectionEnd);
-// bodyField.insert(start,text);}
-// urlRectangle.visible=false}
-// }
-// }
- Row{
- id:buttonRow
- visible:false //(bodyField.length>1)||(attachImageURLs.length>0)
- spacing: mm
- height: 12*mm
- MButton{id:permButton
- visible: (newsSwipeview.stacktype!=="DirectMessages")
- height: 6*mm
- width: 7*mm
- text: ((contact_allow.length==0)&&(contact_deny.length==0)&&(group_allow.length==0)&&(group_deny.length==0))?"\uf09c":"\uf023"
- onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}}
- }
- MButton {
- id: attachButton
- height: 6*mm
- width: 7*mm
- text: "\uf03e"
- visible:(newsSwipeview.stacktype!="DirectMessages")
- onClicked: {
- if (attachImageURLs.length>0){//Server currently accepts only one attachment
- Helperjs.showMessage( qsTr("Error"),qsTr("Only one attachment supported at the moment.\n Remove other attachment first!"), messageColumn)
- }
- else{
- root.imagePicking=false;
- var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
- osSettings.imagePickQml+'{multiple : false;onReady: {attachImageURLs.push(imageUrl);'+
- 'attachImage(imageUrl)}}',root,"imagePicker");
- imagePicker.pickImage()
- }
- }
- }
-
- MButton{
- id:smileyButton
- text: "\uf118"
- height: 6*mm
- width: 7*mm
- onClicked: {if (smileyDialog.visible==false){smileyDialog.visible=true} else{smileyDialog.visible=false}}
- }
-
- MButton {
- id: cancelButton
- height: 6*mm
- width: 7*mm
- text: "\uf057"
- onClicked: {
- bodyField.text="";
- messageSend.state="";
- permissionDialog.visible=false;
- receiverLabel.visible=false;
- reply_to_user="";
- attachImage("");
- attachImageURLs.pop();
- }
- }
- MButton {
- id: sendButton
- height: 6*mm
- width: 7*mm
- text: "\uf1d9"
- onClicked: {
- var title=titleField.text.replace("\"","\'");
- var body=bodyField.getFormattedText(0,bodyField.length);
- var dmbody=bodyField.getText(0,bodyField.length);
- if (newsSwipeview.stacktype!=="DirectMessages"){
- statusUpdate(title,body,parentId,attachImageURLs)}
- else {
- if (reply_to_user!=""){dmUpdate(title,dmbody,parentId,reply_to_user)}
- else{Helperjs.showMessage(qsTr("Error"),qsTr("No receiver supplied!"),root)}
- }
- if (conversation==true){
- newstab.newstabstatus=login.newsViewType; newsStack.pop(null)
- }
- }
- }
- }
- PermissionDialog{id:permissionDialog;x:mm;visible: false}
- SmileyDialog{id:smileyDialog;x:mm;visible: false}
- }
- Component.onCompleted:{
- //
- //parentId=conversationModel.get(conversationModel.count-1).newsitemobject.id
- //if(attachImageURLs.length>0){attachImage(attachImageURLs[0])}
- newsStack.replySignal.connect(setParent);
- root.directmessageSignal.connect(directmessagePrepare);
- root.uploadSignal.connect(sendUrls);
- root.sendtextSignal.connect(sendtext);
- }
-
- states: [ State {
- name: "active"
- PropertyChanges {
- target: messageColumn; height: implicitHeight
- }
- PropertyChanges {
- target: buttonRow; visible:true
- }
- PropertyChanges {
- target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")//true
- }
- PropertyChanges {
- target: receiverLabel; visible:(newsSwipeview.stacktype=="DirectMessages");
- }
- },
- State {
- name: "conversation"
- PropertyChanges {
- target: messageColumn; height: implicitHeight
- }
- PropertyChanges {
- target: buttonRow; visible:true
- }
- PropertyChanges {
- target: titleField; visible:(newsSwipeview.stacktype!="DirectMessages")
- }
-
-// PropertyChanges {
-// target: receiverLabel; visible:true; text:qsTr("to")+": "+ conversationModel.get(0).newsitemobject.user.name
-// }
-
-// PropertyChanges {
-// target: messageSend; reply_to_user: conversationModel.get(0).newsitemobject.user.screen_name
-// }
-
-// PropertyChanges {
-// target: messageSend; parentId: conversationModel.get(0).newsitemobject.status_id
-// }
- } ]
-}
-//}
diff --git a/source-linux/qml/newsqml/NewsStack.qml b/source-linux/qml/newsqml/NewsStack.qml
deleted file mode 100644
index 5cf9d95..0000000
--- a/source-linux/qml/newsqml/NewsStack.qml
+++ /dev/null
@@ -1,579 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import "qrc:/js/news.js" as Newsjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/js/service.js" as Service
-
-StackView{
- id: newsStack
- anchors.fill: parent
- property string updateMethodNews: "refresh"
- property var allchats: ({})
- signal replySignal(var newsobject)
- property int lastnewsid:0
-
- function newstypeHandling(newstype){
- newsBusy.running=true;
- replySignal("");
- //messagesend.state="";
- newsModel.clear();
- switch(newstype){
- case "timeline":
- newstab.newstabstatus="Timeline";
- try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews)
- })}catch(e){Helperjs.showMessage("Error",e,root)};
- break;
- case "conversation":
- newstab.newstabstatus="Conversations";
- Newsjs.chatsfromdb(root.db,root.login,0,function(news,lastid){
- lastnewsid=lastid;
- showNews(news)});
- break;
- case "favorites":
- newsStack.updateMethodNews="refresh";
- newstab.newstabstatus="Favorites";
- Service.updateView("Favorites");
- break;
- case "replies":
- newsStack.updateMethodNews="refresh";
- newstab.newstabstatus="Replies";
- Service.updateView("Replies");
- break;
- case "publictimeline":
- newsStack.updateMethodNews="refresh";
- newstab.newstabstatus="Public Timeline";
- Service.updateView("Public Timeline");
- break;
- case "groupnews":
- newsStack.updateMethodNews="refresh";
- Service.showGroups();
- break;
- case "search":
- newsView.anchors.topMargin=7*mm;
- newsBusy.running=false;
- var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml");
- var searchItem = component.createObject(newsStack,{y:mm,width:root.width,height: 5*mm});
- break;
- case "refresh":
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- //root.contactLoadType="news";
- if (newsSwipeview.stacktype=="Home"){
- Service.updateView(newstab.newstabstatus)
- }
- else if (newsSwipeview.stacktype=="DirectMessage"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Notifications"){
- Service.updateView("Notifications")
- }
- break;
- default:
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- //root.contactLoadType="news";
- if (newsSwipeview.stacktype=="Home"){
- Service.updateView(newstab.newstabstatus)
- }
- else if (newsSwipeview.stacktype=="Directmessage"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Notifications"){
- Service.updateView("Notifications")
- }
- }
- }
-
-
- function showNews(newsToShow){
- try{
- if (newsStack.depth>1){newsStack.pop()}
- }catch(e){}
- newsBusy.running=false;
- var currentTime= new Date();
- // downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
- //print("appendnews "+JSON.stringify(newsToShow))
- var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':newsStack.updateMethodNews, 'options':globaloptions};
- newsWorker.sendMessage(msg);
- //newsStack.appendNews=false
- }
-
- function showContact(contact){ //print(JSON.stringify(contact));
- //newstab.newstabstatus="Contact";
- newsStack.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact});
- }
-
- function search(term){//print("Search "+term)
- if (term!=""){
- newstab.newstabstatus="Search";
- newsBusy.running=true;
- newsStack.updateMethodNews="refresh";
- xhr.setLogin(login.username+":"+Qt.atob(login.password));
- xhr.setUrl(login.server);
- xhr.setApi("/api/search");
- xhr.clearParams();
- xhr.setParam("q",term)
- xhr.get();}
- newsView.anchors.topMargin=mm
- }
-
- Connections{
- target:xhr
- onError:{
- Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
- }
- onSuccess:{
- // downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
- Service.processNews(api,data);
- }
- }
-
- Timer {id:replytimer; interval: 1000; running: false; repeat: false
- onTriggered: {
- newsBusy.running=true;
- if(newstab.newstabstatus=="Conversation"){
- showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)}
- else{
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- if (newsSwipeview.stacktype=="Home"){
- Service.updateView(newstab.newstabstatus)
- }
- else if (newsSwipeview.stacktype=="DirectMessages"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Replies"){
- Service.updateView("Replies")
- }
- replySignal("")
- //Service.updateView(newstab.newstabstatus)
- }
- }
- }
-
- initialItem: Rectangle {
- id:newslistRectangle
- y:1
- color: "white"
-
-// Button{
-// id:newstabstatusButton
-// anchors.top: parent.top
-// anchors.topMargin: 0.5*mm
-// height: 8*mm
-// text: qsTr(newstab.newstabstatus)
-// visible: newsStack.parent.stacktype=="standard"
-// onClicked: {print(newsStack.parent.stacktype);
-// newstabmenu.popup(2*mm,6*mm)
-// }
-
-// Menu{id:newstabmenu
-// width: 40*mm
-
-// delegate:MenuItem{
-// contentItem: Text{
-// font.pixelSize: 3.5*mm
-// text:parent.text
-// }
-// background: Rectangle {
-// implicitWidth: 40*mm; implicitHeight: 5*mm
-// color: "#ffffff"
-// border.color: "grey"
-// }
-// }
-// Action {
-// text: qsTr("Timeline")
-// onTriggered: {
-
-// }
-// Action {
-// text: qsTr("Conversations")
-// onTriggered:{
-// //newsModel.clear();
-// newstab.newstabstatus="Conversations";
-// Newsjs.chatsfromdb(db,root.login,function(news){showNews(news)})
-// }
-// }
-// Action {
-// text: qsTr("Favorites")
-// onTriggered:{
-// newsStack.updateMethodNews="refresh";
-// newstab.newstabstatus="Favorites";
-// Service.updateView("Favorites")
-// }
-// }
-// Action {
-// text: qsTr("Replies")
-// onTriggered:{
-// newsStack.updateMethodNews="refresh";
-// newstab.newstabstatus="Replies";
-// Service.updateView("Replies")
-// }
-// }
-// Action {
-// text: qsTr("Public timeline")
-// onTriggered:{
-// newsStack.updateMethodNews="refresh";
-// newstab.newstabstatus="Public Timeline";
-// Service.updateView("Public Timeline")
-// }
-// }
-
-//// Action {
-//// text: qsTr("Direct Messages")
-//// onTriggered:{
-//// newsStack.updateMethodNews="refresh";
-//// newstab.newstabstatus="Direct Messages";
-//// Service.updateView("Direct Messages")
-//// }
-//// }
-//// Action {
-//// text: qsTr("Notifications")
-//// onTriggered:{
-//// newsStack.updateMethodNews="refresh";
-//// newstab.newstabstatus="Notifications";
-//// Service.updateView("Notifications")
-//// }
-//// }
-// Action {
-
-// text: qsTr("Group news")
-// onTriggered:
-// {
-// newsStack.updateMethodNews="refresh";
-// Service.showGroups();
-// }
-// }
-// Action {
-
-// text: qsTr("Settings")
-// onTriggered:
-// {
-// leftDrawer.open()
-// }
-// }
-
-// Action {
-// text: qsTr("Quit")
-// onTriggered:{
-// Service.cleanNews(root.db,function(){
-// Service.cleanContacts(root.login,root.db,function(){
-// Qt.quit()})
-// })
-// }
-// }
-// }
-// }
-
-// Row{
-// spacing: mm
-// anchors.top: parent.top
-// anchors.topMargin: 0.5*mm
-// anchors.right: parent.right
-
-// Button {
-// id: searchButton
-// height: 8*mm
-// text: "\uf002"
-// visible: newsStack.parent.stacktype=="standard"
-// onClicked: {
-// newsView.anchors.topMargin=18*mm;
-// var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml");
-// var searchItem = component.createObject(newsStack,{y:8*mm,width:root.width,height: 8*mm});
-// }
-// }
-
-// Button {
-// id: newMessageButton
-// text: "\uf040"
-// height: 8*mm
-// onClicked: {
-// var groups=[];
-// Helperjs.readData(root.db,"groups",root.login.username,function(groupobject){
-// groups=groupobject
-// });
-// newstab.newstabstatus="SendMessage";
-// Helperjs.readData(root.db,"contacts",root.login.username,function(friends){
-// newsStack.push("qrc:/qml/newsqml/MessageSend.qml",{"contacts": friends,"login":root.login})
-// },"isFriend",1);
-// }
-// }
-// BlueButton {
-// id: quitButton
-// text: "\uf08b"
-// onClicked: {Service.cleanNews(root.db,function(){
-// Service.cleanContacts(root.login,root.db,function(){
-// Qt.quit() })
-// })}
-// }
-// Button {
-// id: update
-// height: 8*mm
-// text: "\uf021"
-// onClicked: {
-// if (newstab.newstabstatus=="Timeline"){
-// newsStack.updateMethodNews="append"
-// } else {newsStack.updateMethodNews="refresh"}
-// //root.contactLoadType="news";
-// if (newsStack.parent.stacktype=="standard"){
-// Service.updateView(newstab.newstabstatus)
-// }
-// else if (newsStack.parent.stacktype=="directmessage"){
-// Service.updateView("Direct Messages")
-// }
-// else if (newsStack.parent.stacktype=="notifications"){
-// Service.updateView("Notifications")
-// }
-// }
-// }
-
-// }
- Component { id:footerComponent
- Rectangle{
- border.color: "#EEEEEE"
- border.width: 1
- width:newsView.width
- height:6*mm
- Text{
- font.pixelSize: 1.5*mm
- anchors.centerIn: parent
- text:qsTr("More")
- }
- MouseArea{anchors.fill:parent
- onClicked:{
- var currentTime= new Date();
- var lastnews_id=newsModel.get(newsModel.count-1).newsitemobject.created_at;
- var messagetype=0;
- switch(newsSwipeview.stacktype){
- case "Home":messagetype=0;break;
- case "DirectMessages": messagetype=1;break;
- case "Notifications":messagetype=2;break;
- case "Replies":messagetype=3;break;
- default:messagetype=0;
- }
- if(newstab.newstabstatus=="Timeline"){
- Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
- var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true, 'options':globaloptions};
- newsWorker.sendMessage(msg);
- },false,lastnews_id)}
- if(newstab.newstabstatus=="Conversations"){
- Newsjs.chatsfromdb(root.db,root.login, messagetype,function(news){
- var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true, 'options':globaloptions};
- newsWorker.sendMessage(msg);
- },lastnews_id)}
-// else if(newstab.newstabstatus=="Contact"){
-// Newsjs.newsfromdb(root.db,root.login, function(news){
-// var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
-// newsWorker.sendMessage(msg);
-// },newsModel.get(newsModel.count-1).newsitemobject.uid,lastnews_id)}
- else if (newstab.newstabstatus=="Notifications"){}
- else{
- //newsStack.appendNews=true;
- xhr.setParam("max_id",newsModel.get(newsModel.count-1).newsitemobject.id-1);
- xhr.get()
- }}
- }
- }
- }
-
-
-
-// Label{
-// text:qsTr(stacktype)
-// font.pixelSize: 3* mm
-// anchors.horizontalCenter: parent.horizontalCenter
-// anchors.margins: mm
-// }
-
- ListView {
- id: newsView
- property real oldContentY:0
- property bool viewdragged: false
- anchors.fill: parent
- anchors.margins: mm
- //anchors.topMargin: 6*mm
-// anchors.leftMargin: mm; anchors.rightMargin: mm
-// anchors.bottomMargin: mm
- clip: true
- spacing: 0
- header: MessageSend{id:messagesend;onHeightChanged: newsView.positionViewAtBeginning()}
- footer: footerComponent
- model: newsModel
- delegate: Newsitem{}
- onDragStarted: oldContentY=contentY
- onDragEnded: {
- if(verticalOvershoot<-5*mm){
- viewdragged=true
- }
- else{
- if((contentY-oldContentY)>15*mm){
- swipeIndicator.visible=false;
- newsSwipeview.height=rootStackItem.height;
- newsSwipeview.y=0;
- rootStackItem.state="fullscreen"
- }
- else if ((contentY-oldContentY)<-15*mm){
- swipeIndicator.visible=true;
- newsSwipeview.height=rootStackItem.height-12*mm;
- newsSwipeview.y=5*mm;
- rootStackItem.state=""
- }
- }
- }
- onViewdraggedChanged: {
- if (viewdragged){
- var onlynew=true;
- newsBusy.running=true;
- if (newstab.newstabstatus=="Timeline"){
- newsStack.updateMethodNews="append"
- } else {newsStack.updateMethodNews="refresh"}
- //root.contactLoadType="news";
- if (newsSwipeview.stacktype=="Home"){
- Newsjs.getLastNews(root.login,root.db,function(currentlastnews){
- if (currentlastnews>lastnewsid){
- if(newstab.newstabstatus=="Timeline"){
- try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews)
- })}catch(e){Helperjs.showMessage("Error",e,root)};
- }
- if(newstab.newstabstatus=="Conversations"){
- Newsjs.chatsfromdb(db,root.login,0,function(news,lastid){
- lastnewsid=lastid;
- showNews(news)});
- }
- } else {
- Service.updateView(newstab.newstabstatus)
- }
- });
- }
- else if (newsSwipeview.stacktype=="DirectMessages"){
- Service.updateView("Direct Messages")
- }
- else if (newsSwipeview.stacktype=="Notifications"){
- Service.updateView("Notifications")
- }
- else if (newsSwipeview.stacktype=="Replies"){
- Service.updateView("Replies")
- }
- viewdragged=false
- }}
- }
-
- ListModel{id: newsModel}
-
- WorkerScript {
- id: newsWorker
- source: "qrc:/js/newsworker.js"
- }
-
- BusyIndicator{
- id: newsBusy
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top:parent.top
- anchors.topMargin: 2*mm
- width:10*mm
- height: 10*mm
- }
- Rectangle{
- id:downloadNotice
- property alias text: noticeText.text
- color:"white"
- border.color:"grey"
- z:1
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom:parent.bottom
- anchors.bottomMargin: 2*mm
- width: noticeText.width+2*mm
- height: noticeText.height+2*mm
- visible: (downloadNotice.text!="")
-
- Text{
- id:noticeText
- color: "grey"
- anchors.centerIn: parent
- width: contentWidth
- height: contentHeight
- font.pixelSize: 2*mm
- text:""
- }
- }
-
- Component.onCompleted: {
- //print(newsSwipeview.stacktype);
- root.newstypeSignal.connect(newstypeHandling);
- root.messageSignal.connect(onFriendsMessages);
- root.contactdetailsSignal.connect(showContact);
- root.newsSignal.connect(showNews);
-
- try{newsModel.clear()} catch(e){}
- swipeIndicator.visible=true;
- newsSwipeview.height=rootStackItem.height-12*mm;
- newsSwipeview.y=5*mm;
- rootStackItem.state=""
-
-// xhr.setLogin(login.username+":"+Qt.atob(login.password));
-// xhr.setUrl(login.server);
-// if((newsStack.parent.stacktype=="standard") && (root.news.length>0)){
-// showNews(root.news)
-// }
- //else{
- newstab.newstabstatus=login.newsViewType;
- var messagetype=0;
- switch(newsSwipeview.stacktype){
- case "Home":messagetype=0;break;
- case "DirectMessages": messagetype=1;break;
- case "Notifications":messagetype=2;break;
- case "Replies":messagetype=3;break;
- default:messagetype=0;
- }
- if((login.newsViewType=="Conversations")&&(newsSwipeview.stacktype=="Home")){
- Newsjs.chatsfromdb(db,login,messagetype,function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews);
- })
- }
- else{Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
- lastnewsid=lastid;
- showNews(dbnews)
- })}
- //}
- }
- }
-}
diff --git a/source-linux/qml/newsqml/NewsTab.qml b/source-linux/qml/newsqml/NewsTab.qml
deleted file mode 100644
index 248bee5..0000000
--- a/source-linux/qml/newsqml/NewsTab.qml
+++ /dev/null
@@ -1,184 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see