FR 2494 then FR 3193 at Barcelona
Palma de Mallorca → Barcelona → Riga
Timetable, Barcelona time
16:55FR 2494 from Palma de Mallorca at the gate
16:20FR 3193 to Riga leaves the gate
23 h 25 apart on the timetable, overnight
FR 3193 leaves 23 h 25 after FR 2494 arrives on the timetable: more than half a day, so not a connection we count.