Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop' into cover
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVanAssche authored May 14, 2018
2 parents f48731b + 3b6931c commit 35c2026
Show file tree
Hide file tree
Showing 30 changed files with 269 additions and 37 deletions.
1 change: 1 addition & 0 deletions harbour-sailfinder.pro
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ DISTFILES += qml/harbour-sailfinder.qml \
qml/components/MatchesCover.qml \
qml/components/ProfileCover.qml \
qml/components/DefaultCover.qml
qml/components/SchoolJobDelegate.qml

SAILFISHAPP_ICONS = 86x86 108x108 128x128 256x256

Expand Down
13 changes: 12 additions & 1 deletion qml/components/PhotoGridLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.1
import Sailfish.Silica 1.0
import Harbour.Sailfinder.Models 1.0

Item {
property var photoListModel
Expand Down Expand Up @@ -67,7 +68,16 @@ Item {
height: parent.height
sourceSize.width: width
sourceSize.height: height
source: model.urlMedium
source: {
switch(api.getBearerType())
{
case Sailfinder.Ethernet:
case Sailfinder.WLAN:
return model.urlLarge
default: // mobile networks or unknown
return model.urlMedium
}
}
asynchronous: true
opacity: progress
visible: index < 6 // Max 6 photos
Expand Down Expand Up @@ -144,6 +154,7 @@ Item {
height: parent.width
anchors.centerIn: parent
visible: false
asynchronous: true
z: 1

MouseArea {
Expand Down
67 changes: 67 additions & 0 deletions qml/components/SchoolJobDelegate.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* This file is part of Sailfinder.
*
* Sailfinder 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.
*
* Sailfinder 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 Sailfinder. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 2.0
import Sailfish.Silica 1.0

ListItem {
property string icon
property string name
property string title
property bool editable

contentHeight: column.height + Theme.paddingLarge
width: parent.width
enabled: editable

Column {
id: column
anchors {
left: image.right
leftMargin: Theme.paddingMedium
right: parent.right
rightMargin: Theme.horizontalPageMargin
verticalCenter: parent.verticalCenter
}

TextLabel {
text: name
visible: text.length > 0
}

TextLabel {
text: title
// No name provided? Use the normal textsize
font.pixelSize: name.length > 0? Theme.fontSizeTiny: Theme.fontSizeMedium
font.italic: name.length > 0 // Italic when fontSizeTiny is in use
visible: text.length > 0
}
}

Image {
id: image
width: Theme.itemSizeSmall
height: width
anchors {
left: parent.left
leftMargin: Theme.horizontalPageMargin
verticalCenter: parent.verticalCenter
}
asynchronous: true
source: icon
}
}
26 changes: 26 additions & 0 deletions qml/pages/MatchProfilePage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ Page {
Connections {
target: api
onFullMatchProfileFetched: {
// Enhance profile
match.distance = distance
match.schools = schools
match.jobs = jobs

// Update view
heading.title = Util.createHeaderMatchProfile(match.name, match.birthDate, match.gender, match.distance)
schoolsListView.model = match.schools
jobsListView.model = match.jobs
console.debug("Match profile enhanced!")
}
}
Expand Down Expand Up @@ -64,6 +69,27 @@ Page {
readOnly: true
visible: text.length > 0
}

SilicaListView {
id: schoolsListView
width: parent.width
height: contentHeight
delegate: SchoolJobDelegate {
icon: "qrc:///images/icon-school.png"
name: model.name
}
}

SilicaListView {
id: jobsListView
width: parent.width
height: contentHeight
delegate: SchoolJobDelegate {
icon: "qrc:///images/icon-job.png"
name: model.name
title: model.title
}
}
}
}
}
25 changes: 25 additions & 0 deletions qml/pages/ProfileView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ SilicaFlickable {
ageMin.value = api.profile.ageMin // Order is important otherwise the value will not be updated due our limits implemented in the sliders
photoList.photoListModel = api.profile.photos
bio.text = api.profile.bio
schoolsListView.model = api.profile.schools
jobsListView.model = api.profile.jobs
headerChanged(Util.createHeaderProfile(api.profile.name, api.profile.birthDate, api.profile.gender))
updatesTimer.start()
}
Expand Down Expand Up @@ -139,6 +141,29 @@ SilicaFlickable {
placeholderText: qsTrId("sailfinder-bio-hint")
}

SilicaListView {
id: schoolsListView
width: parent.width
height: contentHeight
delegate: SchoolJobDelegate {
icon: "qrc:///images/icon-school.png"
name: model.name
editable: false // Updating schools and jobs not supported yet
}
}

SilicaListView {
id: jobsListView
width: parent.width
height: contentHeight
delegate: SchoolJobDelegate {
icon: "qrc:///images/icon-job.png"
name: model.name
title: model.title
editable: false // Updating schools and jobs not supported yet
}
}

//% "Discovery"
SectionHeader { text: qsTrId("sailfinder-discovery") }

Expand Down
23 changes: 23 additions & 0 deletions qml/pages/RecommendationsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ SilicaFlickable {
console.debug("Recommendation data received")
photoList.photoListModel = api.recommendation.photos
bio.text = api.recommendation.bio
schoolsListView.model = api.recommendation.schools
jobsListView.model = api.recommendation.jobs
retryTimer.stop()
recsBar.canSuperlike = api.canSuperlike
recsBar.loaded = true
Expand Down Expand Up @@ -107,6 +109,27 @@ SilicaFlickable {
readOnly: true
visible: text.length > 0
}

SilicaListView {
id: schoolsListView
width: parent.width
height: contentHeight
delegate: SchoolJobDelegate {
icon: "qrc:///images/icon-school.png"
name: model.name
}
}

SilicaListView {
id: jobsListView
width: parent.width
height: contentHeight
delegate: SchoolJobDelegate {
icon: "qrc:///images/icon-job.png"
name: model.name
title: model.title
}
}
}

ViewPlaceholder {
Expand Down
Binary file removed qml/resources/images/icon-addimage.png
Binary file not shown.
Binary file removed qml/resources/images/icon-bio.png
Binary file not shown.
Binary file removed qml/resources/images/icon-edit.png
Binary file not shown.
Binary file modified qml/resources/images/icon-job.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed qml/resources/images/icon-liked.png
Binary file not shown.
Binary file removed qml/resources/images/icon-location.png
Binary file not shown.
Binary file removed qml/resources/images/icon-more.png
Binary file not shown.
Binary file removed qml/resources/images/icon-noimage.png
Binary file not shown.
Binary file removed qml/resources/images/icon-notliked.png
Binary file not shown.
Binary file removed qml/resources/images/icon-share.png
Binary file not shown.
Binary file removed qml/resources/images/icon-social.png
Binary file not shown.
Binary file removed qml/resources/images/image-placeholder.png
Binary file not shown.
11 changes: 0 additions & 11 deletions qml/resources/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,26 @@
<file>images/cover-background.png</file>
<file>images/cover-logo.png</file>
<file>images/dislike.png</file>
<file>images/icon-addimage.png</file>
<file>images/icon-bio.png</file>
<file>images/icon-code.png</file>
<file>images/icon-edit.png</file>
<file>images/icon-fontawesome.png</file>
<file>images/icon-friends.png</file>
<file>images/icon-giphy.png</file>
<file>images/icon-github.png</file>
<file>images/icon-gitlab.png</file>
<file>images/icon-instagram.png</file>
<file>images/icon-job.png</file>
<file>images/icon-liked.png</file>
<file>images/icon-linkedin.png</file>
<file>images/icon-location.png</file>
<file>images/icon-matches.png</file>
<file>images/icon-more.png</file>
<file>images/icon-noimage.png</file>
<file>images/icon-notifications.png</file>
<file>images/icon-notliked.png</file>
<file>images/icon-paypal.png</file>
<file>images/icon-profile.png</file>
<file>images/icon-recs.png</file>
<file>images/icon-refresh.png</file>
<file>images/icon-school.png</file>
<file>images/icon-search.png</file>
<file>images/icon-send.png</file>
<file>images/icon-share.png</file>
<file>images/icon-social.png</file>
<file>images/icon-spotify.png</file>
<file>images/icon-translate.png</file>
<file>images/image-placeholder.png</file>
<file>images/launcher-logo.png</file>
<file>images/like.png</file>
<file>images/sources.txt</file>
Expand Down
4 changes: 3 additions & 1 deletion rpm/harbour-sailfinder.changes
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
* Tue May 10 2018 Dylan Van Assche <[email protected]> 4.4-4
- [MINOR BUGFIX] Sailfinder can now run in the emulator again
- [MINOR BUGFIX] Messages are scrolling automatically when the keyboard shows/hides
- [MAJOR BUGFIX] Jobs are now parsed correctly by Sailfinder
- [IMPROVEMENT] Remorse action used when needed
- [IMPROVEMENT] Stability improvements for the login screen
- [IMPROVEMENT] Location updates are still working OK
- [IMPROVEMENT] Automatically throttle the quality of the pictures to reduce data usage on mobile networks
- [IMPROVEMENT] Use Silica booster for faster startup
- [NEW] SFOS cover when Sailfinder is minimized
- [NEW] Delete pictures from Tinder (hold a profile picture to show remove screen)
- [NEW] Opt-in for Smart Photo's
- [NEW] Moved to OBS for building RPM's
- [NEW] See the distance of your matches
- [NEW] Show schools and jobs for recommendations and matches
- [NEW] Show schools and jobs for recommendations, matches and your profile
- [UPGRADE] /updates endpoint data upgrade
- [WIP] Phone login support preparations
- [LIBS] Moved to new Nemo import syntax
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-sailfinder.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name: harbour-sailfinder
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Sailfinder
Version: 4.4
Release: 4
Release: 5
Group: Qt/Qt
License: GPLv3
URL: https://github.com/DylanVanAssche/harbour-sailfinder
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-sailfinder.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: harbour-sailfinder
Summary: Sailfinder
Version: 4.4
Release: 4
Release: 5
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
Group: Qt/Qt
Expand Down
Loading

0 comments on commit 35c2026

Please sign in to comment.